orientation and copy sop

   2324   1   1
User Avatar
Member
35 posts
Joined: Oct. 2007
Offline
hello all, I have been writing a plugin to import scenes from houdini into maya which have been built using the copy to points method (copy some geometry to some particles for instance). I write out the rotation quaternion and the position through chops, and write out the untransformed geo via .obj. Everything seemed like it was correct, but the orientation of the objects always seemed to be off. After much debugging I figured out that the copy sop is using a combination of the velocity vector and the rotation quaternion to orient the geometry. I figured this out by setting the velocity on the cached template points to 0 (using a point sop). When I do this my maya scene (which I rexported out back to houdini to check it) matches the houdini scene perfectly. The rotations are being set in the particle system which created the geo cache for the template point attributes. Is there a way to get the worldspace orientation in one quaternion, so that I won't have to export velocity through chops as well and try to reverse engineer how houdini is calculating it's final orientation (which would be good to know in any case).

I hope I've been clear.

thanks

-ranxx
User Avatar
Member
7752 posts
Joined: July 2005
Offline
That's an interesting problem. Offhand, I'd say try creating a sphere with a vector attribute with a known axis, say (0,1,0). Now copy run through a reference copy of your Copy SOP with your sphere. The Copy SOP will transform your vector attribute the same way it will with the instances. Now you have 2 vectors per particle which you can compute a quaternion with.
  • Quick Links