Jump to content
flyeroner

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.

Share this post


Link to post
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 1

Share this post


Link to post
Share on other sites

Big thanks for your attention. But I'm newbie and I couldnt do that. Can you be more clear. 

In dopimport I select Fetch Geometry from Dop Network as import style and wrangle running over points. 

aasd.PNG

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×