Hiding specific triangle of mesh

I have a ground mesh and I need to make holes in it. What would be the best/easiest way to hide specific triangle of mesh without changing it’s geometry? I need to toggle on/off those triangles dynamically. Do I need custom shader for this?

You can use the alpha component of the vertex colors to make a triangle disppear.

However, for this to work, you need to flatten your mesh so that no vertices are shared among faces: each face must have its 3 own vertices, different from the 3 vertices of the other faces.

https://playground.babylonjs.com/#4PA5V8

1 Like

Thank you. It will work for now, I guess :slight_smile: