Split one group based on ... space between objects?
5093 5 2- jiff
- Member
- 5 posts
- Joined: March 2015
- Offline
Hi all,
As usual, I'm a newbie.
So I'm trying to split a group of objects into two groups based on a distance or something better.
See here:
The Blue group have six balls close to each other, same for the Green group, So, to split the two groups, I want to use the space between them if possible.
What I tried is this:
I've connected a point SOP to Group1, then attached a foreach SOP to the point SOP, and plugged a Ray SOP to the each SOP inside foreach, since Houdini document stated that the Ray SOP needs points as input 1 to work.
But .. I couldn't figure out how to use it probably.
So, what can I do?
As usual, I'm a newbie.
So I'm trying to split a group of objects into two groups based on a distance or something better.
See here:
The Blue group have six balls close to each other, same for the Green group, So, to split the two groups, I want to use the space between them if possible.
What I tried is this:
I've connected a point SOP to Group1, then attached a foreach SOP to the point SOP, and plugged a Ray SOP to the each SOP inside foreach, since Houdini document stated that the Ray SOP needs points as input 1 to work.
But .. I couldn't figure out how to use it probably.
So, what can I do?
- sidenimjay
- Member
- 703 posts
- Joined:
- Offline
you can use the following in a group by Expression parm:
$BBX>.5
in this case it says any prim ( or point depending on mode ) that has an x position greater than the mid point of the bounding box will be grouped
then you can use the Combine tab to make the second group that is using the not equal button and selecting the first group
this would work for this case, but maybe not if you need multiple groups where only points within a tolerance of any direction are grouped together
$BBX>.5
in this case it says any prim ( or point depending on mode ) that has an x position greater than the mid point of the bounding box will be grouped
then you can use the Combine tab to make the second group that is using the not equal button and selecting the first group
this would work for this case, but maybe not if you need multiple groups where only points within a tolerance of any direction are grouped together
- jiff
- Member
- 5 posts
- Joined: March 2015
- Offline
Wow,Thanks, really good, for a second I thought this is it.. but um ..
I have this fractured cylinder, deleted the pieces inside it, so I have left and right pieces (maybe up and down in some cases), this solution (despite how clever it is) won't work for this specific case.
I've changed it to $BBY for testing.
Now, the left and the right parts could be wider (more pieces) or thinner (less pieces), maybe animated too. :cry:
So,
this would work for this case, but maybe not if you need multiple groups where only points within a tolerance of any direction are grouped togethermaybe is what I'm looking for.
I have this fractured cylinder, deleted the pieces inside it, so I have left and right pieces (maybe up and down in some cases), this solution (despite how clever it is) won't work for this specific case.
I've changed it to $BBY for testing.
Now, the left and the right parts could be wider (more pieces) or thinner (less pieces), maybe animated too. :cry:
So,
- goldleaf
- Staff
- 4200 posts
- Joined: Sept. 2007
- Online
- jiff
- Member
- 5 posts
- Joined: March 2015
- Offline
Soooo Close! :cry:
Thanks,
Yeah, Cluster might work, except that there is something buggy with the result.
I've connected a color SOP to the partition SOP for testing.
So on a frame, the left pieces become red, on the second frame, the right pieces are the red .. huh!
I need to play more with the cluster parameters and see.
Thanks,
Yeah, Cluster might work, except that there is something buggy with the result.
I've connected a color SOP to the partition SOP for testing.
So on a frame, the left pieces become red, on the second frame, the right pieces are the red .. huh!
I need to play more with the cluster parameters and see.
- jiff
- Member
- 5 posts
- Joined: March 2015
- Offline
-
- Quick Links