Define point number

   4194   3   1
User Avatar
Member
39 posts
Joined: July 2014
Offline
I have been looking into changing the point numbers on a geometry and found the Sort node very useful but I'm wondering is there a way to define which point you want to be which number?

In the image I am trying to show where I would like the points 0,1,2 to be defined along the geometry. Is that possible? And if so could any one please let me know how. Thanks.

Attachments:
definePoints.png (766.2 KB)

User Avatar
Member
8637 posts
Joined: July 2007
Offline
just create an attribute containing your numbers (or at least the same incrementing order)
then Sort SOP/By Attribute

but keep in mind that resulting point numbers will always be unique integer numbers starting at 0 with increment of 1, so if your source attribute does not follow these rules, actual numbers will be different, however the order will be used from attribute
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
39 posts
Joined: July 2014
Offline
Thanks your reply Thomas. I'm still very new to houdini and am trying to understand it's different workflow from other packages. From your reply, I still don't understand how I define where I would like specific point numbers to be? Do I make an attribute from a point selection? The whole promote attribute in houdini is a bit confusing to me at the monment but I'm working on it. Thanks again for your reply.
User Avatar
Member
48 posts
Joined: June 2011
Offline
Depending on what purpose you actually need this for, it would usually be best to try and define the point order procedurally somehow using a VOP SOP node. (VOP SOP is pretty much the go-to node to process any data into any other data)

If you want to manually specify a point ordering, I knocked up a quick VOP SOP containing a bit of inline code to parse a string of numbers and create an integer attribute from it, which then gets passed into a sort node. Not sure if it's the most elegant way, but it's *a* way :-)

Attachments:
reorder_by_point_list.hip (74.5 KB)

  • Quick Links