Because of the title of the previous question, I need to create a new topic.
The problem now is that when I create ThinInstance using the merged Mesh, if the ThinInstance Matrix is offset too much, it will disappear, but not at the origin, because the Mesh that created ThinInstance is at the origin, And what the surrounding box shows is normal.
If I’m understanding your question correctly, this is normal behavior, because the bounding box of a thin instanced mesh is the box surrounding all of the thin instances. So if one mesh is instanced very far away, the box will be big.
Yeah, you’re right. But according to my experience, Thin Instance does not support single Thin Instance culling. Since my thininstances are scattered all over the scene, all of my Thin instances should be displayed when the camera sees the bounding box. But here’s the thing: My thin instances will only show up if my camera contains the origin mesh.
This PR will fix the problem with the far mesh not appearing:
The problem (bug in Babylon) in your first PG is that a mesh with thin instances doesn’t maintain a bounding info per submesh and uses the bounding info of the original submesh (without thin instance). The PR will fix that.
Regarding the z-fighting problem, try to use bigger minZ values (like 1 or 10).