I know the standard line is that you need to be using Humanoid animation in order to retarget animations from one model to another. But I’m about ready to give up on Humanoid animation, due to its inadequate masking capability.
I’ve just verified that with Generic animations, I can indeed mask any way I want — so I can play facial expressions independent of what the head is doing. And I know I lose built-in IK, but there are a couple of good IK solutions in the Asset Store that will probably (I hope) make up for that.
That only leaves retargeting. I want to be able to take animations A and B from character 1, plus animations C and D from character 2, plus animations E through H from Mixamo, and use all of these on both characters.
It seems to me that if my characters have exactly the same bone structure, it ought to work. But I’m a little vague on exactly how Unity finds the bones to update when doing generic animation. Is it by bone name? By counting branches in the transform hierarchy? Something else?
I can’t be the first to try to retarget generic animations; does anyone know of a good blog post or something on just how painful this is?
Should be exact bone hierarchy, bone name and parent should match.
You can have partial match, but only the matched bones will animate. Plus you are not retargeting anymore, just applying the animation.
Retargeting mean adapting an animation from a different scheleton, shich may be for example taller and still mantain the overall look. With generic you are only applying the translation and rotation without any changes, so you will likely have issue with bones trepassing the body or extending too mich if the rig is too different.
Thanks, that all seems reasonable. My characters are close enough in body proportions that I expect simply “applying” the animation will work fine.
And yeah, only animating the matched bones is exactly what I want. For some reason, whenever I apply a Mixamo animation to some of my models, the mouth locks open, leaving them gaping like a fish… and when I apply (say) a masked animation of just the face, the rest of the model locks in the fetal position. That’s just dumb, and I long for a method that simply leaves unspecified bones alone! Sounds like this approach might be it (as long as I am careful to ensure all the bones are named consistently).
I honestly can’t remember how that worked out. But from re-reading the above, it seems like it ought to work as long as the skeleton hierarchy is the same.