Jump to content

Working with multiple groups procedurally

Recommended Posts


I have a number of layers consisting of a certain amount of primitive curves. 
Level_1, Level_2, Level_3, etc. So it's kind of like a tree. I have promoted these primitive curves to point groups with same the name. I then grouped the first point of each curve on all layers to a point group called “start”.
So what groups I have is:

Level_1, Level_2, Level_3, Start.

What I want to do and need help with is to fuse these curves together procedurally as they are disconnected. 

As the groups are layered the fusing has to occur layer by layer aswell.
So I want the “Start” group of Layer_2 to fuse together with any points on Level_1. Then the “Start” group of Level_3 to fuse with any points onLevel_2. So only the starting points will fuse with the underlying layer.

Manually this is easy but since the layer amount will change it's not a solid option.

Hopefully I made myself somewhat clear. 
Have a nice day!

Picture below shows and example of how I am thinking. Level_2's start points gets fused to Level_1's curve.


Share this post

Link to post
Share on other sites

seems like a good use for a loop. look for tutorials on For Loops in SOPs.

Share this post

Link to post
Share on other sites

Thank you for your reply!
I looked into using for loops and I am pretty sure this is the way to go, however I am uncertain how to get more control of whats going on in the for loop. 


In the picture I have a couple of primitive groups that gets looped. Trunk, Group_1, Group_2, Group_3, Twigs.

What I want now is to use Ray Sop to fuse the groups in order. 

Group_2 fuses with Trunk.

Group_3 fuses with Group_2.

Group_4 fuses with Group_3.

Twigs fuses with Group_4.

So I thought all I had to do was to delete the Trunk group and then insert to the Ray Sop to get the order I wanted. But it doesn't work.

Edited by hampuseh

Share this post

Link to post
Share on other sites

This could be done using a single wrangle node in point mode as well I think.

masking use of the following function.
int  nearpoint(<geometry>geometry, string ptgroup, vector pt)
the pseudo code would look something like this

// Create string with corrcet group name "Level_%D", own_level-1

//find near point using created group string

// if point found move self to location of found point

Afterwards use the fuse node to fuse everything together.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now