• Advertisement
Sign in to follow this  

Quaternions for mirrored animation

This topic is 4365 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an animation system based on quaternions. Is there a simple way to mirror a quaternion around an axis (eg: the y axis so if my character faces forwards along y it will be mirrored left/right)? Obviusly the translation of each joint will have to be mirrored too.

Share this post


Link to post
Share on other sites
Advertisement
You mirror through a plane, so I assume you want to mirror the rotation through the plane that has the axis in question as its normal.

To mirror the rotation, you just negate the value corresponding to the axis in question (Y axis if you're Z-up in this case), and you also negate the W value.

However, you'll probably find that you need to mirror various positions, too, unless your animations are purely angular based. Once you do that, the mesh skinned to the animation keys might start looking bad. If everything's fully symmetric, it will likely work, though.

Share this post


Link to post
Share on other sites
Well I'm trying to mirror around a plane along the Y axis, with Z up so I guess it's the X translations and the X and Real parts of the quaternions i need to negate. I'll give it a try.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement