Geometry nodes: Mesh boolean won't recognize geometry intersecting itself

I’m trying to generate a random maze using geometry nodes with curve - mesh conversion and a noise texture. I got the basis working as intended with a circular pipe, will be using a custom profile shape later.

The issue is seen in the top-right 3D view: Each individual spline creates its own pipe when solidified into a mesh, as such they each poke through one another on the inside. This is expected but not what I want, my goal is an interior maze.

As such I added a boolean modifier to turn the outer shape into one structure. Surprisingly it doesn’t work with the intersect mode. I only pipe one geometry into it, but have enabled the Self Intersection setting which I thought would make the whole structure merge with itself whenever there’s an intersection.

I enabled Fill Caps in the Curve To Mesh node then used a Merge By Distance, as such each pipe should be a solid shape even if part of the same geometry. What is going wrong and how do you suggest solving it?

Try changing the solver from ‘float’ to ‘exact’

be forewarned though, this is a slow operation, and it gets slower the more mesh it has to deal with. I would strongly advise testing on a much smaller sample of the maze tunnels. Heavy boolean operations can take many minutes to calculate in GN.

Starting to see what’s wrong: Union boolean on a single geometry input works fine when using instances, the results of an Instance On Points node will intersect fine with itself. I should only need a way to separate the different splines into independent instances.

There’s a Split To Instances node but I need a selection based on which to split: It offers a Spline mode but by itself it doesn’t seem to work. Do curves offer a spline ID for each individual spline generated when converting from mesh?

Got it working as desired. You only need a Split To Instances node using the Mesh Island Index: Now the Mesh Boolean node recognizes each segment as independent and merges the interiors accordingly. It’s indeed very slow even with the Fast / Float solver let alone Exact which is needed to fix some errors, it should be used sparingly but gets the job done and generates accurate interior hallways.

1 Like