Sorting issue..

   871   4   2
User Avatar
Member
27 posts
Joined: 10月 2022
Offline


Hello

I created lines from the bottom edges of the boxes, but there is an issue with point sort. Is there a way to rotate the lines clockwise for each box?

Attachments:
sorttest.png (532.1 KB)
sorttest.hiplc (1.3 MB)

User Avatar
Member
133 posts
Joined: 3月 2016
Offline
Hello - Not quite sure if this is what you mean but if you drop down a 'Polypath' then a 'Sort' and sort by vertex order, each of the connected prims will then have pt counts that are sequential along the path.
Love Houdini
User Avatar
Member
27 posts
Joined: 10月 2022
Offline
Hatchery
I want the orientation of @N to remain consistent and connect in one direction. Since I'm fetching boxes in Unreal, I can't predict the initial point direction. Therefore, after fetching, the points should be sorted clockwise for each box.




Attachments:
sortdir.png (330.3 KB)

User Avatar
Member
4387 posts
Joined: 2月 2012
Offline
Hi,

You can create an angle attribute in VEX (Point Wrangle) and then sort the points using this attribute:

@angle = degrees ( atan2 ( @P.z, @P.x ) );
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
328 posts
Joined: 4月 2018
Offline
The Labs Sort SOP has a Circular sorting option built into it.
  • Quick Links