Creating new groups in a for loop

   3305   2   0
User Avatar
Member
21 posts
Joined: April 2018
Offline
Hi

How would I go about creating new groups each time a connected primitive goes through the loop?

For example:
I have these tubes with smaller spheres scattered on them.


Each time I go through a connected primitive for loop I would like the smaller spheres to be grouped based on the overlapping tube. It cant be done from the points they were scatted from as the input geometry is going to only primitives in the real situation.

I've had quite a bit of struggle understanding where to even start.

I'm guessing it would probably go through a connected primitive loop but seeing as the group sop can only do volume or bounding box input to group points and verts it's not so useful here. Unless there is someway to find the rest of the connected primitive from just a single point?

The other thing is I don't know how to create new groups based on the for loop iteration. Would this be done with an attribute wrangle? “iteration” supposedly returns the integer value of which iteration it is on right?

Here is where I'm stuck:
User Avatar
Member
555 posts
Joined: Feb. 2017
Offline
you gonna upload your file or you wanna hold on to your IP ?

it's possible but how would i know if this works with your file, i simply don't.
Edited by vusta - Sept. 2, 2020 17:55:42

Attachments:
meatballs.jpg (86.7 KB)

User Avatar
Member
9415 posts
Joined: July 2007
Offline
I'd recommend using attribute with value based on iteration number rather than a group, it's much more efficient to have one attribute with many different values for different part of geo, than having many groups
and it's also much easier to work with such attributes, whether it is string or int attribute
Tomas Slancik
CG Supervisor
Framestore, NY
  • Quick Links