- Home /
Humanoid rig breaks when legs are over extended?
I'm trying to share animations across a variety of character proportions, and using a humanoid rig to re-target anims. But something about the way it's processed causes lots of glitches whenever an arm or leg is fully extended; the knee/elbow starts to twist randomly and the feet don't stay in place properly.
It seems like when the limb goes completely straight, the rig doesn't know how to calculate which direction the joint is supposed to be facing. None of these issues happen in 3dsmax, or in the fbx export, or if I'm importing it as a generic rig. But as soon as I switch to Humanoid something changes in the way the joints are oriented.
I've seen the same issue happen with the motion capture software we used, where actors in t-pose with arms fully extended would have random twisting in their shoulders and wrists, but the problem resolved as soon as they started using natural movements. Which is probably unrelated, really. I've been manually editing the animations to make sure the legs never quite extend all the way, but sometimes it's not that noticeable until the animation gets imported and it becomes a huge bug.
Answer by theANMATOR2b · May 25, 2018 at 12:45 AM
I'm guessing this is happening when the animation being retargetted is from a shorter character than the target character?
You mentioned 3D Max, if using biped you can easily change the scale of the character then export so this anomaly is reduced or eliminated. Of course the scale change will have to be done in figure mode. If not using biped, consider converting the animation type to bip, so it can be retargetted onto a biped then the scale can be changed prior to importing into Unity.
Sorry I have no Unity related solution. Please update with the solution you find, end up using.
Answer by Tighti · May 25, 2018 at 07:29 PM
Yes, it's generally the characters with longer legs that this bug appears on. But early on we decided we'd get more consistent animations by using a rig with an average height and build rather than using the more extreme variations, and I'm not sure we can easily go back and alter them at this point. We're using a biped base, but with some custom rigging on top (for props etc.) that don't resize as easily.
Answer by HattyCastles · Mar 24, 2020 at 05:23 PM
I encountered a very similar issue in 2020, and I wanted to add to this. It seems from this answer that Unity creates a new, generic rig when you use the "Humanoid Rig" import option. This rig has an IK handle on each limb. This answer on the reddit post Animation glitch when importing to Unity discusses how IK handles can only bend in one plane. That plane is defined by the IK handles pole vector. It seems in the generic humanoid rig that Unity does not give you control over the pole vector plane and that the plane is always aligned with the character's forward and up vectors.
This means that whenever the limb extends to the point that there is no bend in the IK handle, the IK handle's rotation defaults to the rotation of the pole vector, which is forward (or backward depending on which is closer, as planes aren't directed). In my case, this results in the animations for forward running looking fine but the animations for strafe running getting this rotation glitch.
Your answer
Follow this Question
Related Questions
Dealing with Humanoid Animation Import issues 1 Answer
High Quality rig with Mecanim 0 Answers
Retargetting Quality low on SAME RIG 0 Answers
3ds max rigging problem 0 Answers