how to use dopoption's rot to rotate mesh

   2792   6   0
User Avatar
Member
102 posts
Joined: March 2013
Offline
I just tried use expression “dopoption” to get rigidbody's position and rotation. then use those data to create attributes to a point:
dopoption“Position” > position
dopoption“Rotaion” > normal
then use a copy to move the spheres. ( I want sphere's motion and rbd's are same)
http://youtu.be/er3ZdIoIv00 [youtu.be]

the position is very well but rotation is not. how to use the “dopRotation” correctlly? can someone give me a help, please.
thank you!

Attachments:
dopoption.hipnc (268.3 KB)

User Avatar
Member
8535 posts
Joined: July 2007
Offline
you can't just use euler rotation values as N, you need to convert it to quaternion and export as orient attribute to get proper orientation

but as an easier method you can use Dop Import Records SOP to import points and data from RBDs (it contains all necessary data like position, orientation, pivot, …) and use that directly for the copy so no expressions necessary

fixed file with both methods

Attachments:
dopoption_fix.hipnc (288.5 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
102 posts
Joined: March 2013
Offline
wow, dopimportrecords is very cool and easier!!
thank you very much
User Avatar
Member
102 posts
Joined: March 2013
Offline
sorry, I just notice this file has some bug, so I deleted it
User Avatar
Member
2 posts
Joined: July 2013
Offline
replace_HIRes

Attachments:
RBDproxy_fix.hipnc (2.4 MB)

User Avatar
Member
2 posts
Joined: July 2013
Offline
fix_rot

Attachments:
dopoption_183_fix.hipnc (246.8 KB)

User Avatar
Member
102 posts
Joined: March 2013
Offline
thank you Charles : )
  • Quick Links