Answered

Animations exported to fbx are slightly different

EverydayDev 3 months ago updated by Peter - Soxware Developer 3 months ago 1

I am trying to export animations as fbx for optimization, but they look different, no matter the fbx setup (tried ascii, binary, changing the version, lossy, lossless, etc), in the end the fbx animations always differ a bit, and some movements get very wonky. Left side is the .anim export, Right side is the fbx export.

UMotion Version:
1.22p03 PRO
Unity Version:
2020.1.2f1

Answer

Answer
Answered

Hi,
thank you very much for your support request.

Please note that the size of the *.anim file shown in the windows explorer is not the size the *.anim file is going to have in your built game. The build size is shown in the inspector of the *.anim file. The authored *.anim file contains lots of editor only data that increases the file size in your project, but this data is stripped as soon as you build your game.

Never the less you are right, exporting to *.fbx can bring the file size even further down.


What you're seeing here is that the humanoid avatar generated for your exported fbx isn't created correctly, thus the animation re-targeting has more offset/error than usual. There are two ways you can overcome this issue:

  1. In the UMotion export settings, set "Write Mode" to "Update Existing File". Then select your character's *.fbx file as destination file (you can also duplicate your character's *.fbx file first if you want). This ensures that Unity uses the correct humanoid avatar for converting your fbx animation to humanoid.
  2. If you want to keep "Write Mode" to "Export As New File" you need to create a T-Pose in the first frame of your animation. Go into Config Mode and make sure your character is in T-Pose there. If not, click on the "Apply Bind Pose" button and then click on "Save Reference Pose". Your character should now be in T-Pose. Back in edit mode, move all keys of your animation clip one frame to the right. Move to the first frame, click on "Apply Reference Pose" to apply the T-Pose. Then create key frames for all bones. Now delete your previously exported *.fbx and re-export. Usually this ensures that Unity generates a correct humanoid avatar for your character (but this can depend on the character rig). In the inspector of your fbx animation, you can adjust the timing so that the first frame is skipped.


Let me know if this works for you.


Best regards,
Peter

GOOD, I'M SATISFIED

I simplified and exported my model as fbx, made a new Umotion project, imported the old clips and exported using  "Update Existing File", it worked! Thanks

Satisfaction mark by EverydayDev 3 months ago
Answer
Answered

Hi,
thank you very much for your support request.

Please note that the size of the *.anim file shown in the windows explorer is not the size the *.anim file is going to have in your built game. The build size is shown in the inspector of the *.anim file. The authored *.anim file contains lots of editor only data that increases the file size in your project, but this data is stripped as soon as you build your game.

Never the less you are right, exporting to *.fbx can bring the file size even further down.


What you're seeing here is that the humanoid avatar generated for your exported fbx isn't created correctly, thus the animation re-targeting has more offset/error than usual. There are two ways you can overcome this issue:

  1. In the UMotion export settings, set "Write Mode" to "Update Existing File". Then select your character's *.fbx file as destination file (you can also duplicate your character's *.fbx file first if you want). This ensures that Unity uses the correct humanoid avatar for converting your fbx animation to humanoid.
  2. If you want to keep "Write Mode" to "Export As New File" you need to create a T-Pose in the first frame of your animation. Go into Config Mode and make sure your character is in T-Pose there. If not, click on the "Apply Bind Pose" button and then click on "Save Reference Pose". Your character should now be in T-Pose. Back in edit mode, move all keys of your animation clip one frame to the right. Move to the first frame, click on "Apply Reference Pose" to apply the T-Pose. Then create key frames for all bones. Now delete your previously exported *.fbx and re-export. Usually this ensures that Unity generates a correct humanoid avatar for your character (but this can depend on the character rig). In the inspector of your fbx animation, you can adjust the timing so that the first frame is skipped.


Let me know if this works for you.


Best regards,
Peter