Subtract geometry in NGE

Is it possible to subtract 2 geometries in NGE, like when using CSG? I would like to subtract geo B from A to create a sort of a solid ring in this example below


cc @Deltakosh, maybe adding CSG operations would be something to consider?

The problem is that you could easily hang your system because CSG is slow, and it is really easy to generate meshes with thousand or millions of triangles with the NGE…

Yea I want to add booleans to nge
Maybe using csg but as you mentioned we need to be cautious:)

You could use GitHub - copy/v86: x86 virtualization in your browser, recompiling x86 to wasm on the fly and just use your sdfgen.exe lol

here we are folks: New boolean block for NGE by deltakosh · Pull Request #14368 · BabylonJS/Babylon.js (


This is great, thank you for making it happen!
Will try it out soon.

Hey @Deltakosh I tried it out in a very simple way, I’m not sure what behavior to expect or if I’m using it correctly, I get some weird artifacting.

Here is a better view: Babylon.js Node Geometry Editor (

Keep in mind that CSG (which the boolean is based upon) is not perfect. In this case I can see why the intersection generates that output as the arc in the 2nd cylinder tends to not close properly the final face

1 Like