Jump to content

copy to points with rotation of rbd


Recommended Posts

Hi everyone. I have a RBD sim that falling some geo's. And I wanted to copy some geo's to their centers. But theese geo's has no rotation data. How can I copy the rotation data of sim  ? I tried to tranfer  orient and w attributes and it doesnt work as well.

Link to comment
Share on other sites

Packed primitives like those coming out of a Packed RBD Object store their transform information in primitive intrinsic attributes. The rotation is part of the "transform" intrinsic. You can convert this to a p@orient attribute recognizable by the Copy SOP with the following VEX:

matrix3 xform = primintrinsic(0, "transform", @ptnum);

p@orient = quaternion(xform);

 

btw MOPs also can do this via Extract Attributes.

  • Like 2
Link to comment
Share on other sites

I'm attaching a hip file to help explain.

There's two things you can do: one is manually extract the transform using VEX as I described earlier... there's a catch in that the Copy SOP also recognizes the "pivot" attribute exported from the RBD simulation, so your boxes won't be in the right place unless you zero that out. The other method is to use the Transform Pieces SOP to copy the transforms over, as long as the boxes have the same "name" attribute as the original simulated primitives.

transform_rbds.hiplc

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...