Minimizing humanoid animation retargeting errors

I’m working on a little project where I want to let all kinds of different characters fight. I have no fixed set of characters - it’s a private fun project where I just grab them from pretty much everywhere. The only thing they all have in common is that they fit into Mecanim’s idea of Humanoid characters.

So I figured that naturally, this is something where retargeting comes in. My idea is to make animations for one reference character only and then use them for all the others as well. The issue I’m stuck with is what reference character to pick and how I can make animations in order to minimize the errors on retargeted animations.

For example, one of the biggest recurring errors for me is feet being off - in a way that I cannot fix them by just changing the Y offset. This is probably because the leg bone chains behave slightly differently for every character. So when I make a basic stance for my reference character (currently Space Robot Kyle), when retargeting to another character, one foot is “flying” a bit while the other is somewhat beneath the floor (see attached pictures):

3043344--228065--retarget.jpg

I realize that this is where foot IK will help me, and it does, but I’d like to minimize the problem at its core.

What I noticed is that the better an animation looks on the “Unity Model” (the default guy in the animation importer preview), the better it looks for pretty much every other character as well. However, I cannot seem to find a reference model and rig optimized or even designed for Mecanim’s retargeting. Whatever I pick, I always end up with slight errors with the “Unity Model” already like in the picture above. That I also why I asked this question on Unity Answers.

Does anybody know good strategies and maybe a good rigged reference model that I can use to build animations for “mass retargeting”?

Thanks very much in advance!

I’m having the same issue. I use animations and characters from Asset Store and it is just a pita to get characters and animations from different sources going.

Did you find a solution?

I’m building animations myself so I can’t say how to fix foreign ones.

However, I “solved” my issue by using the Unity Dude, ie the same model that Unity uses for previews, as the model to create animations with. I found the model in some Unity demo project, I believe this one.

I also realized a lot depends on how exactly you set up the rig of imported models. You can probably spend hours to fine tune them to perfection, so add some trial and error to your troubles.

After fumbling around forever this is what I found out:

1.) After importing a new character + animation set it to humanoid and make sure Unity has all bones.
a.) click on animation, find ‘Rig’, set to ‘humanoid’ and ‘create from this model’ like always.
b.) click ‘configure’ to configure the rig.
c.) even if everything is green, make sure all bones contain something. Often Unity doesn’t find the shoulder, but it will most likely be there.
If you don’t do this, animations that f.e. rotate the shoulder will look wrong on the character even if they use another Avatar. Don’t ask me why.

2.) set your animation to humanoid and test it on the new character.
3.) if it looks ok, you’re done. But most likely it will look odd (foot sliding… whatnot).
4.) in the animation, go to rig->configure again and rotate bones. It means nothing if everything is green.
In my limited experience with this stuff it was never good to rotate the hips. Better fumble around with the other bones even if your pose looks odd. As a rule of thumb, work ‘in direction’, so e.g. if your character leans back too much in animation, bend the spine bone back a bit to compensate.
This process is a trial&error number tweaking game that can go on forever.

Probably (not tested) you have to duplicate your animation for every character and fumble with the rig on every animation separately. But it may also be possible that ‘humanoid’ step standardized it, I don’t know.

I’m not an Artworker, so please excuse if all of this is obvious for you.