Answered

Humanoid animation does not look the same after export (serious difference).

Maya Gameworks 3 years ago updated 3 years ago 9

Mesh.rar

When I export an "Idle" zombie animation where my zombie never moves their legs in the clip editor he suddenly starts floating in the air, as if he is connected, like a puppet, to someone's hand. This does not mean he is flying - he is touching the ground with his feet, but he moves the feet to the left or right when standing, instead of them being glued to the ground like they should be. I've read all your posts about differences in animation, I've tried ALL properties and all tweaks - nothing works. I even copied the entirety of the animation from FK to IK, deleted all keys for IK foot positions and rotations but one and ensured they are pinned - nothing helps, the zombie still floats. Generic animation is out of the question.

I've attached the project file and the zombie mesh file to this post so that you can check for yourself.

UMotion Version:
1.22p11
Unity Version:
2020.2.0b6

Answer

Answer
Answered

Hi,
thank you very much for your support request.

I looked at the files you provided. When exporting a humanoid animation to fbx, I highly recommend setting write mode to "Update Existing File" (in the export settings) and set your original model as destination file. This exports your animation into the characters fbx file (Shirtless Zombie.fbx) and ensures that when Unity imports it, it uses the correct humanoid avatar to generate the humanoid animation. Here is a screenshots of the export settings I used:

Then select the "Shirtless Zombie.fbx" in Unity's project window. Enable the animation import in the Inspector and set "Root Transform Position (XZ)" to "Original". Then click apply. The animation should now preview correctly in the preview window (and should thus also work in-game).

Please let me know in case you have any follow-up questions.


Best regards,
Peter

GOOD, I'M SATISFIED

Thanks. Looks like I did not try everything again :). I remember you wrote about "Update original", but to be honest:
1) I did not think it would make much difference.
2) I would never have thought you have to specify the MESH file and not the original animation file - you should clarify this IMHO in the manual.

In any case it worked, thanks!

Satisfaction mark by Maya Gameworks 3 years ago
Answer
Answered

Hi,
thank you very much for your support request.

I looked at the files you provided. When exporting a humanoid animation to fbx, I highly recommend setting write mode to "Update Existing File" (in the export settings) and set your original model as destination file. This exports your animation into the characters fbx file (Shirtless Zombie.fbx) and ensures that when Unity imports it, it uses the correct humanoid avatar to generate the humanoid animation. Here is a screenshots of the export settings I used:

Then select the "Shirtless Zombie.fbx" in Unity's project window. Enable the animation import in the Inspector and set "Root Transform Position (XZ)" to "Original". Then click apply. The animation should now preview correctly in the preview window (and should thus also work in-game).

Please let me know in case you have any follow-up questions.


Best regards,
Peter

Hey, a quick follow-up: when I export the file from this very project, the last 75 frames are empty: it seems like the animation is sped up 25% so that it ends at frame 300 and the remaining frames are blank, what could it be?

I just checked the files you've sent to me originally and for me the whole 375 frames are exported correctly (with the settings I provided in my previous post).


  1. Does the animation preview for the full length for you (in the inspector preview window, when the fbx is selected and the animation tab is opened)?
  2. Is the start/end frame time setup correctly in the inspector (see my screenshot above)?
  3. If the animation previews correctly but doesn't play for the full length in-game, then animator controller isn't setup correctly (maybe the animation transitions before it is played to the end).

Best regards,
Peter

Everything is set up correctly and the problem first appears in the preview window - the only way to fix it for me was to change the end frame to 300 (exactly 25% less). I had this issue with two different animations. Surprisingly enough this is not stable: some animations are exported with this pattern while others are exported with no problems at all. I don't know how I managed to do it but I guess my only recourse is to hope it won't happen again in the future :)

Maybe you exported multiple animation clips with different frame rates into the same fbx file? An fbx file only supports one frame rate for all animation clips within the same fbx file. UMotion adjusts the fbx files frame rate to the latest exported animation clip (this is then indirectly changing the previously exported animation clip's length). UMotion shows a message box/warning when it adjusts the frame rate of the FBX file.

Best regards,
Peter

Where do you change FPS inside the model's inspector?

I can now see that it is indeed 24 FPS but I can't change it myself and I was never prompted by the UMotion when I was exporting (even though I did for other animations).

Afaik the fbx framerate is not exposed in Unity's FBX inspector. Just re-export your animation with UMotion. UMotion is automatically telling you that the framerate of the desitnation FBX file is different than the exported animation and that it is going to adjust the framerate.

Best regards,

Peter

I can confirm that just now when I exported the problematic clip I was prompted to change the FPS. Also, I just recalled that when I did export the clips previously, the .fbx file I updated already had animations - maybe that was the problem (like you suggested in the previous post). Now that I hand an fbx with only 1 clip I was prompted. Still, the other animation clips exist on this .fbx file - they are simply ignored (not listed in the animation list), maybe that's enough? In any case - thank you, another problem fixed!