Separating consecutive points with an attribute from a group

   2618   4   0
User Avatar
Member
25 posts
Joined: Oct. 2012
Offline
I have projected a curve down on a deformed grid with a ray node and given the points a distance attribute. I grouped the points by expression ($DIST == 0) to give me the non deformed points. I need to seperate each series of points so I can perform other operations on it. How do I get separate groups for the red circles I drew in the attachment?

Thanks in advance.
Edited by - Oct. 14, 2012 07:57:44

Attachments:
houdiniSeparateSelection.jpg (143.4 KB)

User Avatar
Member
1390 posts
Joined: July 2005
Offline
You could use Cluster SOP to separate points based on position, but that may be problem for a long curvature objects like yours.

But there is the advantage of that also, because your points actually are in order, so you know that all cluster;s members will have successive numbers. We may use Chops to count attribute's change thanks to that:

1) Make something with any of the attributes of your points, so that it's constant (or maybe it's near constant already) for all point inside your two groups (projected, and rejected). It may be setting ty with PointSOP for all rejected points to 10 and projected to 0 for example.
2) Import that attribute to Chops. Place SlopeCHOP which will compute derivatives (slope). Those will be constant for all but borders points (last and first from a chain). Make derivatives absolute with ExpressionCHOP.
3) Place CountCHOP and set TriggerThreshold parm above any possible change in the attribute and bellow those two states mentioned earlier.
4) Import channel to SOPs (ChannelSOP) as a new attribute (like cluster), use PartitionSOP to create groups based on it. The attribute will be constant inside clusters, but will vary for successive clusters.

hth,
skk

ps adjust a size of the screenshot, pretty please
User Avatar
Member
25 posts
Joined: Oct. 2012
Offline
Thanks for your response.

I do not have any experience with CHOPS so I have a few questions regarding your solution.

- Do you apply a cluster before the point SOP or was that just a different solution?

- What is the output of the chop nodes called? In the expression chop I need to make the output of the slope absolute but how would the expression for that look like?

- Sort of related to the previous question, when importing the values to the channelSOP how would that look like, and what does the cluster here mean?

4. The partition node only gives me the option to group by color or alpha, not atribute. What am I missing here?

Your solution looks like what I need but I'm not fully understanding it yet.
User Avatar
Member
1390 posts
Joined: July 2005
Offline
I shall give you the example.

Attachments:
cluster_in_chops.hip (75.4 KB)

User Avatar
Member
25 posts
Joined: Oct. 2012
Offline
Thank you very much, worked like a charm!
  • Quick Links