Hi there, I read unity document but not really understand.
1.What is root node of humanoid rig? is this automatically use hip?
2.What’s difference between root motion and root node. Is root motion represents “motion of root node”?
3.What is “Bake into Pose” do exactly? Is that like make root node stay at same position?
4.What’s this circle means? Is this means “GameObject’s center transform” or rootNode?
5.What’s the distance in between Chracter. Is this mean the offset of Character’s “root node” and “GameObject’s center transform”?
root node is the very top parent in the hierarchy, usually the hips/pelvis is parented to a master root node, but the hips can be used as the root if they do not have a parent node.
Yes.
Yes.
I don’t pay much attention to the inspector view, sometimes it confuses me with regards to the settings, but I think it does represent the root node.
? Can you elaborate on this? I’m not familiar with this option, which means most likely it is not a very important option.
Root motion when properly set up is on a transform node above the hips in the heirarchy. The hips should be the last joint with any skin weight and then the root joint should be exactly below the hip joint at the character’s feet. The root joint should be the transform that holds all of the curves for the character’s position in space. This get’s more complex for a detailed explanation of a proper root transform rig look here:
You have it right with root motion. There are situations where people want to discard the animation from the root node and code for it instead. So if you have root motion checked then you will have it and if not then it will be ignored.
Bake into pose is about how your animations connect. If you are baking any particular channel into the pose then you are telling unity that it should treat the exit point of the last animation as the start point for the next and continue with the same trajectory in that channel. If you aren’t using any of these then your character will snap back to its origin rather than continue.
However, Bake Into Pose is moot if you are using root motion because using root motion is just like telling Unity that I want all of the transform data for the root node to be considered. If you are using root motion the Bake Into Pose options go away. You won’t even have access to them any more.
That circle is typically aligned with the root node if it is present. As I recall if you aren’t using root transforms the character will leave that circle, walk away from it and then snap back at the end of the animation.
So to make a long story short, you want root motion on unless you will be defining the character’s movement with code.
This is an optional placement for the root node. Most animators prefer this placement to make setting up in engine easier, and because older engines required this root node placement.
Most engines now will allow the root node to be placed at the characters feet or (my personal preference) at the characters center of mass, usually positioned just above the crotch but not always located in the same x,y,z as the hips/pelvis.
Hi theANMATOR2b, thanks for reply.
Sorry about I don’t make the No.5 question clearly. What I want to do is to check what is humanoid rig root node in default by compare 3dsmax file and unity animation preview. (But from your answer is the very top parent? so in my case in the ANIM_D_Rig?)
Here is the rig hierarchy from our rigger:
they use 3rdParty rig plug-in with unity bone, so there’s some controllers I don’t really understand the purpose.
Then I make the Hip move to left of the world center. ANIM_D_Rig(The A sign) move to front. And the controller for whole(The red square controller) move to back.
But in the unity animation preview, it’s looks like this:
From the Circle position and the character’s offset, it’s seems the circle is the center of the world in max by default. Not the very top hierarchy of my rig ANIM_D_Rig…?
But if I choose Root Motion Node with ANIM_D_Rig, the preview looks right as the A sign with character in max file. So I think the default root node is not ANIM_D_Rig, otherwise "default " and choose as “ANIM_D_Rig” should be the same result, right?
So the default of circle is means center of world in max file? I read doc from here:https://docs.unity3d.com/Manual/RootMotion.html
“The Body Transform is the mass center of the character.”
“The Root Transform is a projection on the Y plane of the Body Transform and is computed at runtime. At every frame, a change in the Root Transform is computed. This change in transform is then applied to the Game Object to make it move.”
Or maybe the Root Transform is mean the Body Transform is the mass center of the character, and applied to the Game Object. Is that means the circle is the center of Game Object?
And because I choose Base Upon Original, it plus Hip offset from the circle for character. If I choose Root Motion Node as ANIM_D_Rig, it use ANIM_D_Rig as center and plus Hip offset for character?
So ignore root node’s motion but use other bone’s motion, right?
Oh wait, what I see in the unity is converse as what you said? If I check Bake Into Pose “the Circle” in animation preview window seems to be lock in the place, so the character movement will snap back when animation is end. If uncheck(deflaut) the circle will go with character and looks like continue go forward?
The result of experiment now I got is: If I don’t choose root node in humanoid rig (root node = none). The circle of animation preview window looks like “the center of world space of max file”. Also I found one blog is saying when root node = none, unity will real-time calculate a center bone for you as root node.
So for the answer of my Question 1 and 5, I think unity are use either center of max file or auto-calculated bone as root node if we don’t assign specific one. And the circle in the animation preview window just represent the position of root node.
Will post more info if I have new discover. Thanks.
in mecanim if the root transform is set,
it works like baked center, restarts at initial root position. unusable for controller, but maybe this just bad values.
instead centerofmass should use foot
though mecanim does a pretty good job of masking this with crossfade/transition
I don’t think com-base is precise rootmotion
I dunno if it centerofmass-shift type of thing would do it
by getting rootposition onAnimatorMove and moving transform in lateUpdate (to align foot, probly one that touches ground) on animStateExit.
or getting new foot pos on animStateExit, old in Update
getting root pos on animStateExit, old in Update
and aligning them in lateUpdate?