Remove overlaps

I’d like to remove the meshes inside a box. Is there any idea.

I don’t see how to remove these faces: they are front facing, so they will be visible because your objects are transparent…

You can set the needDepthPrePass property of the material, but it won’t fully work, because it depends on the order the faces are sorted: