Jump to content
  • Advertisement
Sign in to follow this  
Alundra

Mirror animation

This topic is 1215 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

Hi,

Mirror animation is not an easy topic, the naive way which is not stable is :

translation.x = -translation.x 
rotation.x = -rotation.x
rotation.w = -rotation.w 

But on a skeleton this naive way is not possible.

So, here comes the question : How mirror correctly an animation ?

The key is maybe the pelvis bone but how use it correctly to mirror animation ?

Share this post


Link to post
Share on other sites
Advertisement

Scale the mesh?

this should be the right way.

But: will the mesh display the external face, or the internal?

Maybe you need to set the cull face to the internal one...

Try and let we know ^^

Share this post


Link to post
Share on other sites

If a spider is in the right hand and the animation do a circular movement from center to the right, if you mirror the mesh the spider will be on the left hand.

This is not a real mirror of animation, the mesh should not change, only the animation based on a bone mirror table.

Of course, the mesh must be symmetrical.

Edited by Alundra

Share this post


Link to post
Share on other sites


How mirror correctly an animation ?

 

the link in the previous post describes the basic procedure pretty well.   are you thinking of implementing such a system yourself?

Share this post


Link to post
Share on other sites

Having the mirror table is not a problem, this is just a find process.

The problem is to mirror the transform of the two bones then swap.

I tried to mirror the quaternion using the x-axis plane but I got bad result.

The problem looks like because since it's a skeleton, all is in local space.

I often read in animation paper the pelvis word, maybe it's a key for the solution.

Edited by Alundra

Share this post


Link to post
Share on other sites

You first need to determine how the local co-ordinate axes of 2 opposite bones are related. For example, with the skeleton in the T pose, if you increase the angle of the left elbow so that the elbow gets "naturally" bent, do you need to increase the same angle of the right elbow to yield in the mirrored bent, or do you need to decrease the same angle, or is it even another angle (presumably not, but who knows). Mapping can only be done right if such relations are known for all pairs of opposite bones.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!