Hey guys,
I'm trying to import a character into Unity that I rigged and animated and am exporting as an fbx. The animations work and the character imports fine but I am having a weird issue where the feet are raising above the ground when they shouldn't be.
On the left is the original file and the right is the fbx, showing the feet lifting off the ground. We have 7-8 different animations and are having the exact same issue in all of them. I figure it must be an export problem or a rig problem but for the life of me I can't find the issue.
Any help would be appreciated.
edit: here is a warning it is giving
101 attributes had complex animation. Complex animation was exported as baked curves. (8080 evaluations done)
The plug-in has changed some animation curves tangents type to User to ensure interoperability. This mode change will not affect the animation curves' values
Left_LegCTRL_translateX
Left_LegCTRL_translateY
Left_LegCTRL_translateZ
Left_LegCTRL_rotateX
Left_LegCTRL_rotateY
Left_LegCTRL_rotateZ
Hips_CTRL_translateX
Hips_CTRL_translateY
Hips_CTRL_translateZ
Hips_CTRL_scaleX
Hips_CTRL_scaleY
Hips_CTRL_scaleZ
Hips_CTRL_rotateX
Hips_CTRL_rotateY
Hips_CTRL_rotateZ
Chest_CTRL_translateX
Chest_CTRL_translateY
Chest_CTRL_translateZ
Chest_CTRL_rotateX
Chest_CTRL_rotateY
Chest_CTRL_rotateZ
Left_ArmCTRL_translateX
Left_ArmCTRL_translateY
Left_ArmCTRL_translateZ
Left_ArmCTRL_rotateX
Left_ArmCTRL_rotateY
Left_ArmCTRL_rotateZ
Right_ArmCTRL_translateX
Right_ArmCTRL_translateY
Right_ArmCTRL_translateZ
Right_ArmCTRL_rotateX
Right_ArmCTRL_rotateY
Right_ArmCTRL_rotateZ
Head_CTRL_translateX
Head_CTRL_translateY
Head_CTRL_translateZ
Head_CTRL_scaleX
Head_CTRL_scaleY
Head_CTRL_scaleZ
Head_CTRL_rotateX
Head_CTRL_rotateY
Head_CTRL_rotateZ
Replies
does this also happen if you manually bake your curves? ( edit > keys > bake simulation )
and manually delete the rig before exporting ?
When I bake the simulation the bake works but when I delete the rig or the ik's it screws everything up. I think I must have done something wrong with the rig itself, using the controllers to animate and have the constraints linked to the ik's. Here is the hierarchy of the rig.
EDIT: You said that the IK screwed up the rig when you deleted it. You deleted the IKs and curves after baking, right?
I'm working on this animation with Doran.
When the simulation is baked it saves all the key frames and the IK's and Curves can then be deleted but when its exported the animation is non existent in Unity.
Where should the animation be baked to?
Also not sure if this helps but the character begins to float whenever the hip controller is bent downwards. All the other movement seem to work fine.
Edit: It starts to float only after its exported to FBX not in the maya file animation.
or are the legs rotated/bent a bit more than they should ?
exactly which element of the rig do you delete when the offset gets introduced ?
are the translate xyz channels of the hip joint actually keyed on absolutely every frame after the bake simulation ?
The legs are stationary during the animation. The character is sneezing and bending forward and that motion is just using the hip controller pulled down bending the knees because the feet are restricted from moving past 0 on the Y axis.
The offset happens if we don't delete anything. Initially we had just baked the animation using the FBX exporter and that's where we noticed the floating error. Since then we have tried baking the animation right in maya and unchecking the exporter animation bake. When we do that the model we import into Unity has no animation attached to it.
The baked simulation only keyed every key on the root controller named Main_CTRL. If we go down the hierarchy none of the other controllers have the simulation baked just the original animation we had created.
The animation is baked on the bones.
But hang on, maybe I misunderstood, but do you select the control objects (for example Main_CTRL) when you bake?
If yes, then that's the problem.
You select the root BONE, then edit -> select hierarchy, then edit -> keys -> bake simulation. Then, when it's baked, you select the root bone and the hierarchy of bones and the mesh and click export selected -> fbx and turn off bake animation inside the fbx exporter.
Ah okay that is much more clear than any of the forums I've read.
After doing all that the model exports into Unity but when I click the preview screen for the animation the camera is moving as if the animation were playing but the character remains in his initial pose.
This is what it looks like in Unity following the instruciton you posted above.
The characters pose in that window is what he is stuck as. The animation is enabled in the settings.
Under the Rig settings what should the "Animation Type" be set to?
Edit: Alright so I brought the .FBX into maya and it seems the skin detached from the bones. The bones have the animation movement but the mesh remains still.
Edit+: When exporting it still gives the warning that the plugin has changed the curve tangents.
In the fbx exporter properties, under "deformed models", is skins and deformed models ticked on?
I think the animation type should be set to humanoid, in case you have left it on generic.
Unfortunately I am not at my PC at the moment so I can't check unity, but let me know if either of the above worked.
Thank you for all your help guys. It is very appreciated. If anything else comes up I'll post back here.
Alright it didn't take long for it to mess up for me.
The picture above is the result of putting the animation files on to a static model and pushing the play button. All the animations work in preview with the model and they worked with the model they were imported with but not with the static model in the scene.
The rig is set to Legacy because the animation wont play at all in Generic or Humanoid. I may be missing the next step.
Edit: The way I have the animations set up is the main character is just called Character.fbx
The animations are labeled a Character@Sneeze.fbx, etc.