# Mirror animation

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

## 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 ?

Scale the mesh?

##### Share on other sites

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 on other sites

Well you check if the transform matrix has negative determinant, if so just change the cull-mode winding.

##### 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 on other sites

I personally don't unsterstand what you're describing.

##### 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 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 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.

1. 1
Rutin
25
2. 2
3. 3
4. 4
JoeJ
18
5. 5

• 14
• 14
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631757
• Total Posts
3002132
×