I have an animation prepared in Maya with a static locator to be used as root motion. After I import the animation and set it to Humanoid, I tell the animation to use this reference point as the animations Root motion and I select “bake into pose”. The root motion gets stabilized in the animation but the feet keeps moving as if it’s centering the body even though the feet shouldn’t move at all.
Yep. Baking into the pose doesn’t help really.
I only get this problem with humanoid though, legacy root motion doesn’t move around. But I can’t use legacy with the animator so I need humanoid.
Can you explain your workflow a little more? and provide a video of the problem in Unity?
In Maya are you animating by moving the original root node of the character in space, then parenting the root node to a “static locator” mentioned above and exporting with this static locator?
Alternately in the original post it sounds like you might be animating the character inplace with the static locator already set as the root of the hierarchy, then in Unity the feet are doing something not right.
Also “root motion gets stabilized” doesn’t compute how I’d expect an animation with root motion to act.
I’m just not understanding completely -
Better explanation of the entire process is required to assist further, and if you want to have root motion for the character or not.
I use the default humanIK skeleton system in Maya which automatically creates a humanoid compatible bone hierarchy.
I bake every frame of the animation and export the whole animation out with all the parts that appear in Maya as FBX.
Then I import the FBX animation into Unity and choose humanoid.
I configure the bones, get it into T-pose and make sure they all appear green, which automatically does that.
Then I use the following options for the animation import settings :
Loop Time
Root Transform Rotation : Original
Root Transform Position (Y) : Original
Root Transform Position (X,Z) : Original
And when I do that, the animation pulls the hips to the ground level and moves the entire body based on something like the average mass rather than a static location.
What does this refer to? Where is the static locator and what/how is it involved with the character rig - you mentioned in the original post, but didn’t mention in the second post?
Did you input the -0.37 Y position offset?
Your original post sounds like you are adding a master non-moving node that the root character bone is parented to, then using this master node as the root node in Unity.
I don’t pick anything in the import settings. There is a static locator getting imported from Maya as an empty game object named “Character1_ReferenceShape” in the FBX, but it’s not a bone or anything so I can’t use that as the static locator in the Root Motion Node in the animation tab.
I tried using feet as the animations XY position since it doesn’t move so I entered -0.37 in the offset to level the feet to the ground. But since the animation has the character leaning forward and pressing some buttons, the center of mass changes and it moves the whole body quite visibly, even though none of the characters shift their positions like that in the Maya animation or the FBX animations.
Should I do something in Maya before exporting so I can use that as a static point ? Or is there a fix in Unity so the animation works properly as it appears in Maya ?
I’m a Max artist so - help milage may vary greatly
When I export from Max I select the mesh and the bones - nothing else - no IK controls, or random objects that are used to animate, no helper objects or nulls unless they are part of the rig hierarchy. (Animation controls are not part of the hierarchy)
I then click “export selected” which only exports the objects I have selected in the scene.
When the character comes into Unity everything just works as expected.
I don’t know if Maya has an export selected option - if it does try that and set up the character from scratch.
You may also consider checking IK when you have selected root motion bake into pose.
Seems there is something not quite right in the setup.
Hope you solve the problem Cactus.
Also forgot to mention -
After exporting from Max I always test the fbx file - importing it back into Max. Usually any mistakes will show up when the fbx file is imported back into the authoring tool.
I don’t think this will show anything on your issue - I believe the problem is in Unity - but can’t hurt to test it.
Just to clarify - the animations that are messing up - this is on a simple character with a simple 2 state - state machine and simple animation controller?
No complex mecanim statemachine with a complex animation controller scripted with a multi-component character collider?
Just trying to see where in the process you are noticing this animation issue.
Oh yeah I tried importing the FBXs back to Maya to check if they had issues, but they were working perfectly.
It’s using an animation tree but even on single animations it shifts the body rather than making it static.
But the wierd thing is that the animation works fine when I use legacy. It doesn’t shift or cause problems or anything. It only shifts the body when it uses humanoid.
Maybe just attempt a new project with only the character, simple 2 state - state machine and and character controller.
What is the character collider setup? Do the character have a collider? Is the collider set - centered at the base of the feet instead of at the center of the character?
Yeah default idle state transition to walk animation transition back to default idle.
In a completely new project with a new scene.
If everything you have said up to this point about your rig and skin is correct - it is either something in the project causing unwanted results OR simething in the setup process that is causing unwanted results.
If a new project results in the same problem - it is the setup.
If the new project shows correct results - its the other project.
I’m the same issue in Cinema4d. .fbx looks fine in legacy rig and in other other animation tools. I’ve even tried hiding a polygon in the model and bone hierarchy to shift the center of my object, then using that as root/root motion. No luck.
I’m using a generic rig. All this happens in the animation preview window as well as in game.
Edit: Removed IK handles and chains from Player avatar/model imported that. Then did the same with the animated rig baked all the frames/bones. Imported that. Same problem. Still looked fine in Legacy though. But I can’t plug a legacy animation into the “motion” in the blend tree.
Spent all day searching forums and playing with different Root and Rig settings.
Here is a setup that works perfectly if it can help you …
I had curious problems with wrong setting with the capsule collider (but you are saying not having one) …
I also think it is better to have no influences bone instead of null objects in the hierarchy
(sreen01 in Cinema4D)
Real close to your hierarchy. I have removed and baked the IK controllers/Goals before export.
I even built a new Rig and weight and animations. Still the same problem with no hip motion. Yes, tried no Root motion node, and everything in between.
As for the Animator and collider. I’m using a 2d box. However even in a new project and the animation preview the hip/root won’t animate correctly. Im using Unity 5.3.5
Considering the original poster is using Maya, i’m still at a loss.
I’ve since moved onto Unreal4. ThoughI’ll stick around to see if this problem is figured out. It’s an old one and I’ve seen several questions about hip motion issues (hell, even tried renaming away from “hip”). with no definitive answer.
Well, I´m struggling with the very same problems for almost a week now. I tried every possible hirachy, changed scalings of rigs and export units (like multiplying the rig by 100 and by 10), but the hip always turns out to be stuck in the floor in the end. I´m desperate guys.