Hello guy! As the title says, what is the "proper" way to animate to make root motion in games work?
The way I have gone about it right now is to move the root of the rig forward and then animate along that, which leads to pesky foot sliding that I have to manually correct every time I make a change. Feels a lot like I am working against myself and it kills a little bit of the fun in animation for me.
I have seen some videos where they use MAX's cat rig that have some magical auto-calculation for a root/translate bone that follows along the animation perfectly, and it seems to do it as a post-process since it only updates once you changed something.
I am animating in blender with my own rig and yeah, what is the proper way to animate with a root bone? Preferably without having to constantly readjust the curves so no footsliding occurs whenever you change something on the legs.
Tutorial videos are welcome! I searched around quite a bit and I can't seem to find a single one that adress this issue, so it feels like I am trying to do something that is obvious to everybody else.
Best regards
//Morgan
Replies
This guy shows both, but I think he did it the same way as I did, basically moving the root motion forward and then adjust the curves to fix slippage.
And then I saw this guy:
He animates freely without moving the root forward until the very end (yet it doesn't offset the character??)
The more I look into this the more confused I get.
At 6m45s
The "root" thing he got is automatic and he isn't forced to constantly fix foot slides with curves when doing stuff with root motion in mind. I really want to know how to do this, because it makes it more fun and intuitive to animate.
If that is truly the root bone (the top node in the hierarchy) then everything else should follow it, it shouldn't move based on other bone's movements.
But a way to do what you want in Blender -- visually, at least -- is to use a Copy Location constraint on the root bone, to copy the X and Y world-space coordinates of the pelvis bone, without copying the Z coordinate (so the root is constrained to the XY plane, stays on the ground).
You will also need to apply an inverse (you tick the 'inverse' checkbox) Copy Location constraint to the pelvis bone because when you move the pelvis the root will move as well, creating a "dependency" (pelvis moves root that moves pelvis that moves root etc.). This avoids the bones blasting off to some far away place.
Also the pelvis is parented to the root bone, but it's not connected. The root bone has a custom shape as that blue arrow:
However, it all goes bonkers and it behaves really erratic.
Just to see if I got it right, I have a copy location constraint on the root pointing at the other bone where the x and y is ticked.
And on the other bone I have another copy location constraint pointing to the root, where x and y + inverse is ticked? I also tried without x and y ticked with only inverse ticked, same erratic behavior.
Best regards
//Morgan
There are two issues here:
1) Unreal \ Unity or some other game engine uses the movement of the root bone to move the character.
2) Animating using the root bone is unintuitive and makes it difficult to align things like feet.
You want to animate like in that second video you posted, "How to Create Root Motion for Animations | Maya & Unity", where the guy moved the pelvis bone -- the second bone in the hierarchy, right below the root, and that still controls everything else -- so the feet will stay flat on the ground because of the IK chains of the legs. This way you move the full character with the hips and animate the legs with IK.
When you're finished with the animation, the root bone doesn't move like it needs to for it to work in game engines.
In Blender, using the Graph Editor mode you can copy the X, Y or Z location channels from the hip\pelvis bone and paste them to the root bone. Then you delete these position channels from the pelvis bone so it doesn't move around anymore, the root bone will. The result is visually the same except it's now in a way that the game engine wants.
(Blender specific ->) Before doing this you need to add at least one 'location' keyframe to the root bone, a dummy keyframe so that the root bone has animation data and you can select both bones in pose mode and copy and paste keyframes from one to the other.
It's standard use of the Graph Editor (it's in the Key -> Copy\Paste Keyframes menu), so it's a matter of reading how to use it. If you find yourself doing these steps a lot you can probably make a script for this later (like a macro, doing these steps faster).
I tried this other way, and I found the benefits of moving the entire root and then animate along that outweigh the benefits of the copy paste hip to root translation way.
At least I learned a ton from all this experimenting!