I’m trying to perform a specific operation in Blender 4.2 using Geometry Nodes. My goal is to apply a Convex Hull around each consecutive pair of objects in a collection, combining them two at a time in sequence.
What I Want to Achieve: Normally, it’s simple to apply a Convex Hull to each individual object in a collection. However, I want to take it a step further by pairing each object in the collection with the next one in order (sorted by name) and applying a Convex Hull around each pair.
I’ve already written a Python script that does this, but I’d like to recreate it in Geometry Nodes. Here’s the logic I used in the Python script:
In the script, I go through each object in the collection, pair them up sequentially, and apply a Convex Hull to each pair.
The Challenge in Geometry Nodes: In Geometry Nodes, I need help setting up the nodes to:
- Sequentially pair each object in the collection (already Realized as instances).
- Apply a Convex Hull to each resulting pair.
What I’ve Tried So Far:
- Here is my current Geometry Nodes setup.
- Here is my current Scene.
- The result I would like to achive in geometry nodes .
I’m using a Repeat Zone to handle the pairing, because the collection has more than two objects. Since I only want to combine two objects at a time, I set the Repeat iterations to be the number of objects in the collection minus one (e.g., for 8 objects, I use 7 iterations to get 7 Convex Hulls).
In this setup, I’ve created counters that increment with each iteration. I’m setting the indices “First Index” and “Second Index” to 0 and 1 at the start, and incrementing them by 1 with each repeat. Right now, this allows me to manually pair the first and last objects in the sequence.
However, I can’t get this to work automatically. After the Convex Hull operation on the 0th and 1st meshes, I want it to automatically proceed to the 1st and 2nd meshes in the next iteration, and so on.
Right now, I can only manage this pairing manually, but I’m looking for a way to automate it in Geometry Nodes. Any advice would be greatly appreciated!