Does bake have weird side effect on mesh clipping?

This video shows that some of the child meshes are being clipped before others.

See for repro.

This 3d reconstructed mesh has complex texture mapping in patches (based on how colmap works), so all the holes you see here are because one of the child meshes is not being drawn even though I’m not that close that the mesh should be clipped. I wonder if babylon thinks I’m closer than I am somehow because of my use of bakeCurrentTransformIntoVertices? Perhaps some GPU state is out of sync or something?

The frustum clipping is done by using the bounding boxes: you should show them (mesh.showBoundingBox = true) to make sure they are ok.

You can also try to recompute the bounding boxes by calling mesh.refreshBoundingInfo() and see if that helps.

You rock! refreshBoundingInfo solves the problem. Perhaps bakeTransformIntoVertices should do that automatically then ?

You should not need it, see this PG:

The bounding box is correct after having baked the current transform, no need to perform a call to refreshBoundingBox.

Maybe it’s different in your case because you are dealing with a glb file which generates a special root node…