Utilizing LOD Control with spatial (building model) as appose to terrain quad

Good afternoon to all,

I have been working with JMonkey for about a year, and regardless of the difficulties I’ve faced I’ve been able to walk myself through the issue thanks to the magnificent online documentation; however, I’ve finally hit a topic that I’ve been unable to find a definitive (or even a suggested) methodology to handle.

My issue is related to terrain, or more specifically the scene as a whole. The “game” that I am currently working on is a pet project that is a replica of my office building with physics based destructible elements (aka, have a bad day at work; smash the office to crap… virtually).

So currently the objects in play are the following:

  1. The model of the building itself (it’s a high detail model of the interior of the building; a cross section of one floor only, not the whole building)
  2. A sky map generated from video footage of the building to simulate the same view you would see if you looked out the window of the 3rd floor that I work on.
  3. A terrain object that is a model of the nearby exterior of the building (you will never walk in this area, it’s simply to help the realism of the view from the windows inside the building, the terrain is for the close aspects, the sky map for far).
    So essentially the building model is the actual “playable” terrain that players will walk on, collide with, etc.; the exterior terrain is purely cosmetic.

My confusion stems from what is the best practice to use for Terrains when they aren’t height map generated. Currently all Terrain, Terrain Quads and LODControllers seem to be limited to working with a single plan mesh, but my model is not a plane but rather more of a cube (terrains specifically state they don’t work for caves, which the interior of a building essentially is)…

My ultimate goal is to somehow make my building model be considered as part of the terrain quad meshes so that say for instance you are in the north end of the building and the south end is in another terrain quad, the LOD Controller will draw the parts of the building near me with high detail, yet the far away south end of the building will be drawn with lower detail…

Now I did discover the LODControl class (as appose to the TerrainLODControl) but I don’t know if this is the right direction, and before performing a bunch of trial and error I figured I would ask the many talented minds in the community if they have any personal experience with something similar.

Thank you in advance to all who took the time to read this post and especially to those who are able to provide any feedback, your contributions are greatly appreciated!

1 Like

Given the close distances within indoor environments (less than 100 meters), there’s not much point in using LOD algorithms there. LOD algorithms are useful for outdoor scenes where view distances are much farther.

For the terrain outside the building, you can just model a low detail version in e.g. Blender. Since it can only be viewed from inside the building, there’s no need to spend a lot of time on it. Just enough to make it blend with the skybox.

1 Like