Sorting issue..

   1066   4   2
User Avatar
Member
29 posts
Joined: Oct. 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: March 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
29 posts
Joined: Oct. 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
4544 posts
Joined: Feb. 2012
Online
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 | pragmaticvfx.gumroad.com
User Avatar
Member
334 posts
Joined: April 2018
Online
The Labs Sort SOP has a Circular sorting option built into it.
  • Quick Links