Quaternion bug when baking RBD rotation into a texture

   1737   1   0
User Avatar
Member
2 posts
Joined: 5月 2017
Offline
Hi houdinists,

We are running into a problem that maybe the community can help.

We are currently making a tool to bake Rigid simulations using textures in our engine. We already have a same similar tool currently working in Maya.

For each animated piece we are trying to bake the rotation using the attribute “orient” (quaternion from dop import) inside a texture. However we've noticed that quaternion's values from frame to frame adds sometimes a 360 degrees in XYZ axes in the values baked.
That results weird rotation flips on interpolation.

Houdini seems fine with that data though, including when the baked rotation are re-injected as a unit test.

Anyone here did run into that issue? Also I was curious about how baking rotation was handled in RBD to FBX Gamedev tool.
Cheers

Attachments:
v_cache_quaternion_bug.gif (1.2 MB)

User Avatar
Member
394 posts
Joined: 5月 2017
Offline
Hey brosty. Are you converting from quaternion to euler? Euler flipping is pretty common because of how rotations are expressed differently between the two. cgwiki has a file and comments on the problem here.
http://www.tokeru.com/cgwiki/index.php?title=HoudiniChops#RBD_filter_high_frequency_noise [www.tokeru.com]
  • Quick Links