I recently started optimizing my app and in an effort to keep framerate higher, I was going to use 2 levels of detail for planes that have dynamic text textures. After playing around with webgpu and multiviews (ran into issue with both) I decided to give using LOD a try.
First off, if I set LOD to null at a reasonable distance (like around when text becomes unreadable) it works great! Text meshes disappear and framerate jumps back up!
So then I thought to myself “self, maybe we have an intermediate LOD that is just a basic material so that users can know there is text there…it’s just unreadable”… well, then things got wierd. Works absolutely fine when using a new mesh for every mesh, but if I try to reuse same mesh or instances or thininstances it doesn’t work. I’ve seen a lot of feedback indicating this is kinda…just the way it works. But I have a more fundamental question, namely:
Does this not work because of some technical reason that makes it impossible? or is it more like “we haven’t gotten around to it yet?”
example:
distantMesh = MeshBuilder.CreatePlane("distantPlane", {width: planeWidth, height: planeHeight}, scene);
const material = new StandardMaterial("distantPlaneMaterial", scene);
material.emissiveColor = Color3.White()
distantPlane.material = material;
//this works fine with a "regular mesh"
detailMesh.addLODLevel(distantMesh, 5);
//this doesn't work...I'll need to double check if it works for maybe one of them, but in general it doesn't work
detailMesh1.addLODLevel(distantMesh, 5);
detailMesh2.addLODLevel(distantMesh, 5);
//this doesn't work, no errors, just doesn't work
detailMesh.addLODLevel(new InstanceMesh('simpler', distantMesh);
Just curious.