Csg subtraction artifact

Hello, i am trying to subtract multiple meshes from 1big
i am iterating over the meshes and doing the subtraction
each time i reuse the result of the previous subtraction to do the next one on it
when i follow this some artifacts show visual bugs
but when i do each one alone the subtraction is correct and no bugs
i think re-using the result of the previous subtraction( the mesh) to do the next one on it is messing up the big mesh polygons so it shows the artifacts

my goal is to create multiple subtractions with an array of small meshes.

image

Often, changing the order in how the operations are done can fix these issues…

For instance… joining all the smaller cut out objects into one object, then subtracting that single object from the large mesh.

so instead of A minus b, A minus c, A minus d…
you could try A minus ( b plus c plus d )

Changing the order of these operations can also make the CSG faster… you’re trying to balance where/when the heavy operations happen. it’s somewhat of an art.

4 Likes