Yo @Deltakosh …
There seems to be a problem with instanced meshes as LOD meshes. You fixed this issue once before for instanced meshes coming from GLTF.
In the GLTF Parser all nodes in the the GLTF callbacks are Babylon.Mesh. When setting up LOD and the meshes you use in the add LOD level function call is actually an InstancedMesh the LOD does not work properly.
I setup a few playgrounds with a demo cliff rock mesh, that has different colors for the LOD so you can easily see the different LOD meshes when you pull the camera back.
But there is a problem setting up the exact scenario in the playground because in the playground you get InstancedMesh when call mesh.createInstance and the instanced mesh DOES NOT have a addLODLevel function like the BABYLON.Mesh does… even though if you use GLTF mesh instancing… the object is ALWAYS a Babylon.Mesh even though it might actually me an InstancedMesh and you can call addLODLevel on the instancedMesh.
Anyways… i cant seem to even setup the playground to use InstancedMesh as a LOD Level.
Here a few playground to demo LOD setup with demo rocks
Raw Sample Meshes (NO LOD SETUP)
LOD Setup: Loaded Meshes (Single Rock With LOD)
LOD Setup: Cloned Meshes (Cloned Single Rock With LOD)
But this instanced mesh does not work, i cant even call addLODLevel in playground
LOD Setup: Instanced Meshes (Instances AS LOD)
Can you please fix this again, we need to be able to use instanced mesh as an LOD.
As always… thanks so much