Hi there -
When i rotate camera some of my meshes disappear. I thought it was the frustrum/bounding box problem as described here. In fact, it probably is. But digging deeper I found the root cause.
The bounding box for the mesh is quite far away from the mesh itself - which causes other problems, like the mesh can’t be picked.
Im using a bunch of stock 3d assets - so sometimes get stuff like this. What i’m wondering is: is there any programatic way to fix this? Or even a batch process i can run with Command-line quickstart | glTF Transform? (i dont see anything that seems like a fix there).
Oh - just made another discovery… Sometimes this train (node130) doesn’t show up in the inspector - and sometimes it does. And in Blender it’s named something all together different (Mesh.9581)
Ah, figured it out! The problem was introduced after centering and Draco compressing the asset using GLTF transform. False alarm. (or alarm for another reason).
In sum: the “optimize” command instances repeated meshes (eg: the same train mesh is used 5 times in my sample above, and instancing it saves 500 draw calls), but then combines them into a single node, the effect of which is that babylon gives them a single bounding box, which makes them unpickable individually - and also creates the frustum culling behavior.
What would be amazing is if babylon ran a similar process at runtime, but maintained individual bounding boxes and pickability.
I haven’t seen a GLB load option like that. Apparently there is something like that in “React Three Fiber” - sounds like it would be an amazing add.