Retargeting Animations Between Similar Avatars

Hello reader,
For one of my projects, I’m trying to retarget animations from one source avatar to a target avatar. After spitting through the forums, I see that there have been previous posts about this: Anyone figured out retargeting yet? - Questions - Babylon.js (babylonjs.com). The discussed code however, shows a remap without any alterations to incoming animations based on bone proportions. Therefore I started creating my own implementation (which can be found in the following playground link: Retargeting Avatars | Babylon.js Playground (babylonjs.com)). Press the “Fetch and retarget” button first, then the “playAnim” button. The retarget is working currently, but there are still some issues. Most notably:

  • The fingers are squashed making them appear smaller than they should be.
  • The spine and head seem to lean more back.
  • The hand location is located at the cheek instead of the mouth.

There are also some other limitations to the provided playground code.

  • The retarget works only on skeletons with the same bone names.
  • The retarget for the morphtargets works only for morphtargets with same names.

Lastly, there provided animations have no morphtargets. Animations with these have been tested and are working however.

If you have any tips to develop this further and/or fix the aforementioned issues, please let me know :slight_smile:

Many thanks in advance,
ToucheToucan

I would recommend using AssetContainer which is equipped for that task - Babylon.js docs

Retargeting can be hard!

We have an open issue about it and it’s something we would like to improve, but there’s no ETA at the time.

Maybe this reference can help you:

2 Likes

Here is a simple implementation of Animation Retargeting. You can use it as a reference for your own implementation

3 Likes