- Home /
How to retarget animation to another (faulty?) character model
So, I started to try working with character animations, and I've hit a snag.
I got the Unity Raw Mocap Data from the Asset Store, along with some free zombie models also from there. One tutorial later, I understood the basics of the raw animations, and was able to extract some clips I wanted from them(which worked perfectly in the model that comes with that mocap package).
When I simply tried to drag the clips I made to the Zombie controller's blend tree, like the tutorial did, it did nothing to change the zombie model's animation. I assumed I had to change the Avatar source in the Rig tab in the animation's Import Settings. Trying to change it to the ZombieRigAvatar resulted in an error ( "Copied Avatar Rig Configuration mis-match. Transform hierarchy does not match: Transform 'hips' for human bone "Hips" not found" ), but if I go to my character's rig and try to edit it, the Mapping tab says it's all in its proper position(including the 'hips' part).
So my question is, what must I do to properly retarget the mocap animations in order to make them work in this other character? And if that character isn't properly configured, what could be wrong with it, since one tab says it's faulty but another says it's all where it should be?
Answer by ConflictedDev · Jul 20, 2017 at 07:25 PM
For retargeting animations:
Make sure you have the original character asset the animations are based on
All character assets need to have their own Avatar and, under import settings, their 'Rig' must be set to Humanoid
Make sure all animations' import settings for 'Rig' are set to Humanoid and their 'Avatar Definition' is set to Copy From Other Avatar where their 'Source' is the original character's Avatar the animations are based on
If you followed the above correctly, the animations used in your Animator Controller should retarget from their original Avatar source to whatever Avatar is set in the character's Animator component the Animator Controller is used in.
You can have multiple different characters using the same Animator Controller, where each will independently retarget to their specific Avatar.
NOTE: I haven't looked at the Raw Mocap Data asset or tutorial so if that doesn't work with your specific situation, let me know.