Hiding faces from a cube mesh through a transformation

Hi, I’m working on an app that displays a large number of cubes using instancemesh and a cube geometry.

It’d be useful to hide some faces on each cube. So I thought maybe it’s possible to create a set of transforms, to be able to select the faces shown for each cube.

Is it possible to use transforms for this purpose? If so, could I expect an improvement on performance from applying the transform?

Thank you!

Cannot do that at all with instanced meshes, since all instances use the the geometry.

1 Like

Thank you for the response. So the setMorphAt function for the instanced meshes doesn’t work for this? Pity… :).

(Sorry I wrote “transform” but I was actually thinking of “morph” from the documentation.)

Yes, morphing will work, but if anything it will decrease performance, since you’d be just adding one more step for the GPU to process - it won’t remove the actual triangles sent to the GPU.

Most of the answers in this thread is basically what you’re looking for - but there’s no single method in three that’d help you with voxel meshing.

1 Like