Jump to content
  • Advertisement
Sign in to follow this  
Relfos

Skeletal Animation Retargeting

This topic is 2697 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'm trying to figure out how to retarget an animation from one skeleton to another. This would be very useful in my next project, that features lots of characters that could share lots of animation.
Simply copying the animation data from one character to another is not enough, as if the binding pose is different, for example, it breaks the animation. Also if the limbs don't share exactly the same proportions, the animation also looks incorrect.
Another problem is the number of bones, some characters have more bones in the spine, limbs, others have a more simple skeleton.

For example, this is the current dataset I'm using for testing, the white skeleton belongs to the frog character, and the blue skeleton is from a human animation from another game.
I want the white skeleton to follow the blue skeleton motion, any ideas?

animationretarget.jpg


EDIT:
Just tried an idea, that consists in calculating the diference between a bone and its parent (on the blue animation), and applying that difference to the equivalent white bone.
This is almost perfect, except that is does not mantain the original skeleton proportion.
animationretarget2.jpg

Share this post


Link to post
Share on other sites
Advertisement
does not mantain the original skeleton proportion[/quote]
Can you explain a bit about what you mean by "proportion?" It would seem you would want the proportions to match the mesh size, etc., which you seem to be getting.

Share this post


Link to post
Share on other sites

Can you explain a bit about what you mean by "proportion?" It would seem you would want the proportions to match the mesh size, etc., which you seem to be getting.

The original mesh proportions can be seen in the 1st picture, but in that one, there is no motion retargeting.
When motion retargeting is activated (2nd pic), you can see the mesh is stretched, and adopted the proportions of the other skeleton.

Share this post


Link to post
Share on other sites
that consists in calculating the diference between a bone and its parent (on the blue animation), and applying that difference to the equivalent white bone[/quote]
That would seem to be the correct approach. I'm not sure what your architecture looks like, but each bone should have a scale, rotation and translation relative to its parent bone. Assuming scaling for all is 1 (one), try substituting the translation from each blue bone into the transformation for the white bone (instead of the "white" translation).

You'll obviously need to keep track of which bones map to which (as you seem to be doing) where there are multiple white bones comprising a single blue bone.

EDIT: That is, where there are multiple white bones for a single blue bone, say WhiteBone1->WhiteBone2->WhiteBone3 maps to BlueBone5->BlueBone6, calculate the transform for WhiteBone1->WhiteBone3, and substitute the translation from the BlueBone5->BlueBone6 transformation.

It probably won't be perfect, e.g., the spine will curve a bit differently, but the proportions will be more like the original mesh.

EDIT2: If you're using matrices, you'll want to look for a routine to decompose the white bone transformation matrix into scale, rotation and translations. Substitute the blue translation and reconstruct the animation matrix.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!