There isn’t a built in limit, but CSG operations are slow when both geometries are high poly… you can work around this by using a lower poly intermediate object…
Instead of having complex object A subtracting from complex object B, instead make a single box “C” and subtract C from B, and subtract A from the result of that, then merge the results back together.
Then if you need to make adjustments, you only need to repeat the last step, and that goes quicker. Here’s some screenshots of embossing text on some complex geometries:
There are various acceleration structures that can be used beyond the BSP tree to optimize CSG, but they each have their own caveats and bring along their own set of tradeoffs, but with clever structuring of the operations you can work around the slow NxN2 operations.
Hi, can you please elaborate in formula terms,
" instead make a single box “C” and subtract C from B, and subtract A from the result of that" = (B-C) - A
“then merge the results back together” - which results to merge together to get B-A ?
Thanks.
if we have 2 objects, each 1000 triangles…
subtracting them from each other is like… ~(1000 * 1000) operations, which is too slow.
If we make a 3rd object that is the bounding box of B… (12 triangles)
we get the intersection of box and A (1000*12) operations
we subtract B from this intersection (1000 * size of intersection) operations
then merge the geometries with brute force geometry merge (1000 + size of intersection) operations.
I’m having a hard time articulating it, but we’re making the csg operation simpler, by chopping out just the area affected by the operation, doing the operation on that simpler piece… then combining the results back together.
So… in that picture… there is a gold base… and white text geometry…
and a box set to the size of the text.
the little slab in the middle is that box subtracted from the gold base…
then the text is subtracted from that little slab…
and then the result is merged back in with the base… yielding the final object in the upper right.
this turns out to be faster than subtracting the text from the base directly.
I believe if does allow you to apply another material to the intersection. It creates material groups, so you if you set .material = [ material1, material2 ] you may get material2 on the intersection.