Setting-up a LOP hierarchy in SOPs

   578   2   1
User Avatar
Member
30 posts
Joined: 8月 2018
Offline
I often work with mechanical assemblies of moving parts that arrive as monolithic STL files. This means tagging the individual parts in the geometry and choosing pivot points to create a hierarchy, which I've done without too much trouble in OBJs. Now, I'm experimenting with doing it in LOPs, and would be interested in your feedback on the approach in the attached file (note that I'm constructing a toy mesh in SOPs instead of loading an STL, but the process is the same). In a nutshell, I'm assigning `name` and `path` attributes in SOPs to create the hierarchy, and centering each piece on its pivot point. Then, in a Python LOP, I apply the pivot point locations as transforms on the prims. This allows me to use the Transform LOP to position parts using local coordinates, but I notice that interactive editing using an Edit LOP doesn't work - it always seems to use a computed centroid for transformations. Would love to hear whether there are any problems with my approach, or how you would tackle this.

Cheers,
Tim

Attachments:
Screenshot 2023-12-07 at 15.49.11.png (1.4 MB)
Screenshot 2023-12-07 at 15.49.34.png (2.6 MB)
solaris-rigging.hip (152.2 KB)

User Avatar
Member
160 posts
Joined: 2月 2016
Offline
Your approach sounds valid.
I recommend this tutorial - some cool tricks are shown
https://www.sidefx.com/tutorials/building-components-in-sops-hierarchies-and-kinefx/ [www.sidefx.com]
User Avatar
Member
30 posts
Joined: 8月 2018
Offline
AslakKS
Your approach sounds valid.
I recommend this tutorial - some cool tricks are shown
https://www.sidefx.com/tutorials/building-components-in-sops-hierarchies-and-kinefx/ [www.sidefx.com]

Thanks for the recommendation, I'll check it out. It only occurred to me after posting this that I could look at the output from the Scene Import LOP to see how it tackles hierarchies. One thing that was bothering me was that behavior of the various LOP layout tools are, uh, a little ... obtuse; but I'm starting to realize that it's the tools and not my hierarchy.

Cheers,
Tim
  • Quick Links