Some of my 3D models are detailed are starts to trigger lag, especially when you see all of them from distance.
In a previous technology i used, i used to make Levels of Details like this:
Close to the model, the most detailed model is shown, like a detailed house.
At like 50 meters, it’s less detailed, for instance you can’t see a house’s interior but exterior is still detailed.
At 300 meters, the house’s model become only a few faces.
I to all the models, and i tell the engine which one to display at which distance.
I looked at JME’s LOD, but i’ve seen only an auto generated one which alter meshes, i didn’t found a model-based LOD.
So here are my questions:
Is there a way to manually do LOD by selecting the different models and distance ?
If not, at least is there a “switch” node mecanism ? (a node which have several childrens and you programmatically choose which one is displayed).
And another question a bit off JME:
My modeling software’s exporter is a bit dumb : it generate lots of small meshs instead of grouping the faces by texture, it’s not practical for auto generated LOD.
Which external tools can be used to just “regroup” the different meshs which share the same texture ?
@pspeed made an LODSwitchControl for his tree generator (SimArboreal Editor) which works exactly that way, although I haven’t tried creating one manually outside of his editor - but I imagine it shouldn’t be hard to modify to work to your specific needs
If they all share the same material, then you should be able to batch them into a single geometry by using the SDK Scene Editor’s batching tool.
To do this in the SDK’s scene editor, just select the parent Node that contains your split meshes/geometries, and then right click and press “batch geometries”
Also, the lag might improve after you batch all of your split meshes back together. The total object/geometry count for your scene will have a much higher impact on your FPS than the triangle count, (so having a scene with 10,000 small objects and 100k tris will actually be much much slower than a scene with 100 objects and 100k tris, despite having the same triangle and vertex count)