Extract transform from rbdcarfollowpath and re-apply it back

   680   2   2
User Avatar
Member
38 posts
Joined: Sept. 2024
Online
My goal is to extract the transformation (position and rotation) of the car pieces that go into a RBDCARFOLLOWPATH simulation. So I just want 6 points (body, steering wheel and the 4 wheels with a transformation attribute). I will then apply this in LOPs to my fully textured USD car model using a "Transform by SOP Points" node. The second part in LOPs is working fine, but I the extraction part in SOPs makes me some headache: in the attached hip file, I can apply the transformation from the points back to the original car model. The positions and orientations of all pieces are correct, but the wheels spin like crazy around a wrong axis.

As the RBDCARRIG spits out packed geo, I'm using the intrinsic attribute "packedfulltransform" and set P to {0, 0, 0}. This works fine for everything but the rotation axis of the wheels... Please have a look at the little example hip file.

Attachments:
car_animation.hiplc (522.5 KB)

User Avatar
Staff
443 posts
Joined: Feb. 2008
Offline
You need to first apply the inverse of the packed transform of the packed geo coming from the RBD Car Rig in order to account for the offsets.

Here's an updated hipfile with the fix.

Attachments:
car_animation_FIXED.hiplc (519.4 KB)

User Avatar
Member
38 posts
Joined: Sept. 2024
Online
Many thanks for the help, that's it! I'm glad I was not too far away from the correct solution :-)
  • Quick Links