How to make holes in babylon box?

Hello everyone,

I would like to make a hole in a Babylon box. I do not know if it’s possible.
I succeeded with a polygon, but I would be simpler for me if it is possible on a simple Babylon box.

If you have a solution or an idea to help me, it would be perfect!

Sorry for my bad English, if you don’t understand something, don’t hesitate to ask me, and I can explain in french.

Thank you for your help.

You could use CSG:


I try to use CSG but with MergeMeshes it makes strange things.
Do you have a solution for this ?


Sorry I would have thought it would work with MergeMeshes. Probably the overlapping facets you get with merging the meshes confuses the algorithm or could be because the resulting mesh is convex.

Here is a solution without using merge meshes. Note in line 29 the second parameter so that the first meshes are not disposed.

1 Like

Thanks for your fast response.

I removed MergeMeshs but it was just for the holes. To avoid move 3 meshes I using parenting, but this is a problem too :confused:

Using a transform node as parent seems to work but I do not know enough about CSG to say it will work in all circumstances.

1 Like

Hi, thank you for this post. I see there also solution for my problem.
But Playground behaves very strange in this example. After loading it, it shows 2 plates. But after clicking the “Run” button, it shows only one plate. Is it a bug of Playground?

Probably something is not fully loaded in the first instance bur after the second run it is in the cache so can be used straight away. Something within the PG will need a tweak.

There’s a small bug in the PG, this.scene should be replaced by scene: