I must be missing something with the LOD Control or else I’m just really dense (probably the later).
LodControl lc = new LodControl();
LodGenerator lod = new LodGenerator(astGeo);
lod.bakeLods(LodGenerator.TriangleReductionMethod.PROPORTIONAL,0.9f);
astGeo.addControl(lc);
rootNode.attachChild(astGeo);
This works well and adjusts nicely when it does switch even when I change the reduction value to 0.1f or whatever.
Cool.
I’d have thought though that there’d be multiple “distances” out from the camera where the detail of the provided mesh would decrease. The documentation indicates there are multiple LOD levels but for the life of me I’m unsure as to how to invoke them. Even looking at the TestLodStress.java I’m a bit at a loss.
Is there another class I can look at to give me the hint or some nugget of wisdom that’ll lead me set me right?
I’m probably not the best to answer, but I think the .bakeLods() method is used for a one time reduction, so maybe you could check the object distance manually and set the reduction value based on the distance.
Otherwise the only way I know to set different reduction levels for different distances is through the SDK’s Lod generator in the scene composer, or through blender when you make the model, but I’m not sure how to achieve the same results on a generated model and LodControll with code.
Not sure if I can help but I would generate LODs in the SDK. There you can directly view the various LODs.
By the way, I personally had better experience with the CONSTANT mode instead of PROPORTIONAL.
Egad you are relentless I don’t think SS Editor would work in my case. Everything I’m doing is procedural. So the mesh along with it’s location is random(ish). Although I probably will be using it for figuring out the Shaders I want to use.