Orient all prims in the same direction

   1267   3   2
User Avatar
Member
11 posts
Joined: Dec. 2016
Offline
I can't orient all these prims upwards no matter what I try. I understand it's because of the vertex order but I don't know of any way to give all input prims the same vertex order (e.g. all clockwise/counterclockwise). I've tried methods with Clean, PolyDoctor, Primitive, Sort, even forcing assignment of up, N, and orient with attribwrangle but nothing works.
Edited by badman - Feb. 2, 2023 17:39:09

Attachments:
vertex_order.PNG (33.2 KB)
vertex_order2.PNG (126.0 KB)

User Avatar
Member
359 posts
Joined: April 2017
Offline
There's probably a few ways to go about this, but what you want to do is use a Reverse SOP on any prims that are pointing the wrong way.

Assuming there's only two directions your shells could be pointing (up or down), all you need to do is group any prims that are facing towards -Y. Use a Group Create SOP, enable Keep by Normals, then set Direction to 0,1,0 (or 0,-1,0) and reduce the Spread Angle until you've isolated only the prims facing the wrong direction. Then Reverse that group.
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
11 posts
Joined: Dec. 2016
Offline
Thank you toadstorm! Worked perfectly. I overlooked that since forcing the prim normals to all be Y-up didn't change anything and there were no primitive normals in the geo inspector, but I guess there were still hidden prim normals to be detected by the group sop?
User Avatar
Member
359 posts
Joined: April 2017
Offline
Primitive normals are determined by the winding order of the vertices that make up each primitive... they're not an attribute in the usual sense. The Reverse SOP flips that order so the implicit primitive normal also flips.
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
  • Quick Links