# GeoNodes - Convex Hull Triangulation Issue

Hi, I’m having some issues with the convex hull node on my wrap generator.

The wrap generator basically uses a difference Boolean between a plane and the object you want to wrap around, deletes everything that is NOT intersecting edges, convert to a convex hull, then converting to a curve to get the boarder edge to deform geo around.

The problem is I am finding that the convex hull node is very unpredictable with triangulation. If you intersect a flat plane with an object, it produces clean Ngons which makes extracting the border edges very simple. However if you introduce any rotations to the plane and make it slightly off-kilter in world space (even by a few degrees as seen in the image below), the convex hull is very heavily triangulated and not useable.

So far my workaround was to extrude the convex hull to give it thickness and then Boolean the original plane with the extruded convex hull to get the intersecting edges but it does not produce predictable results a lot of the time as the extrusion is all over the place due to the messy convex hull topology.

Does anyone have a workaround to getting past this, is there a way to perhaps force the convex hull to always produce an Ngons to avoid the triangulation?

Thanks

Hello

You’ll have to use a planar decimate modifier and split your network up like so:

Good luck.

4 Likes

Hi Nicholas,
here’s an alternative approach to your original problem using two Raycasts to shrinkwrap a Curve Circle onto the objects (didn’t want to revive the old thread as it also solves this problem here):

First, I’m using an Empty as a controller object to place a Curve Circle in space. Then I’m shrinkwrapping the points of the curve onto the objects:

The direction of the Raycast node is the center of the Curve Circle. Every point that doesn’t hit anything will get deleted.

After that i create the Convex Hull:

The problem that we now have is, that the Convex Hull is manifold and not just a flat plane. So we can’t really get the borders of it by comparing the Edge Neighbours - Face Count for example.

The idea now is to extrude the Convex Hull and shrinkwrap another Curve Circle once more onto it.
First we get the “Face center” of the Convex Hull:

This is where we want to place our new Curve Circle. The radius for this Curve Circle is the max distance between the center point and the points of the Convex Hull (plus an additional little offset for the final Raycast):

After that, we extrude the Convex Hull in the direction, where our Controller Object is pointing upwards:

This will then be our final Target Geometry. The Direction of this raycast is the center of the Convex Hull, that we calculated before.

The last step is to set the position of the curve points to the Hit Position of the Raycast and then “smoothing out” the curve by changing the Spline Type to NURBS (not necessary though):

Final node tree + .blend file (Blender 4.0):

Rubber_band.blend (151.2 KB)

The accuracy of the final result depends on the resolution of the curves that we use to raycast onto the objects. So you might not get a 100% accurate result as with a mesh boolean - but it’s probably sufficient enough (and also a lot faster).

Edit: To change the size of what is encapsulated you just have to scale the Empty controller object!

Edit #2: Updated the setup to support multiple rubber bands

6 Likes

Thank you so much for that detailed breakdown. Thats a great method of approaching this issue using shrinkwrapping. Seems to be much more efficient than the boolean. I’m going to try and incorporate it into my generator and see how it goes but seems very promising!

1 Like

Hey Zebr4he4d, your setup works great!

I did have one small issue with your setup when converting it to a network that uses instances instead of a controller object. I am trying to capture the rotations of the instances to drive the extrusion offsets however everything I have tried has failed. Are you able to shed some light on why my captured rotations are having no effect on this particular section of your network?

Thanks again.

You need to capture before any domain changes (e.g. points to instance, curve to mesh, etc.)

Good luck.

2 Likes