Answered

Exported fbx shows different animation than curve editor

influjensbahr 5 years ago updated by Peter - Soxware Developer 5 years ago 11


Hi!

First off, thank you for this amazing asset. We are using a MoCap suit to record our animations and UMotion to adjust small errors in the data and cut the animations. Everything looks fine in the Umotion editor, but after exporting the animations as fbx, the character only does weird stuff.

I have searched for solutions on this forum and also found the notes in your FAQ with possible fixes, but none of them worked for me.

Here's our reading guy in UMotion:

Image 188

And here he is during gameplay:

Image 189

I tried:

- exporting the animation into his fbx instead of into a new file (a solution that wouldn't work with all our animations anyways), but it did not fix the issue.

- exporting as *.anim, which fixed the issue but resulted in a 800MB file, which is not viable

- adjusting the avatars and "enforcing T-Pose", which did not change the results

- assigning the character's avatar to the animation fbx, which did not work because the transform "Buechereibesucher mit Brille_geriggt" could not be found. Upon closer investigation I found that the exported fbx has the same transforms, just a bit lower in the hierarchy. Here's our character model's avatar:

Image 190

And here's the auto-generated one from the exported animation fbx:

Image 191

After hours of trying stuff, I hope you can help me figure this out. The animation looks fine in the UMotion editor but then messes up once I try to export and use it in the game itself.

Thank you!
Jens

UMotion Version:
1.21
Unity Version:
2019.3.5f1

Answer

Answer

Hi Peter,

thank you so much for your continued support. I have updated UMotion and it works - as you suspected. Sorry about the wrong info in my first post; I had looked up the UMotion version number in the wrong place and thought it was up to date.

Anyhow, thank you so much for your awesome support! I gave you a review on the asset store and will send you a key for our game once it's finished :-) Let me know if there is anything else I can do to express my gratitude.

Best,
Jens

Hey there, don't know if this helps. For testing I imported the animation to blender and it's showing similar stuff; he seems to be only halfway into his sitting animation:

Answered

Hi,
thank you very much for reaching out.

When dealing with humanoid animations, I highly recommend exporting with "Write Mode" set to "Update Existing File" (UMotion export settings) and select the *.FBX of your character as destination file. That way UMotion is going to write the animation directly into the *.FBX of your character. This ensures max. compatibility as Unity is automatically going to use the correct humanoid avatar when importing the *.FBX animation.


Please let me know if this fixes your issue.


Best regards,
Peter

Hi Peter, thank you for your prompt response. I tried that approach once more but it didn't work. I am attaching a screenshot of the game in play mode. You see that he is not quite in the same pose as in my first post. At the bottom you see that this time I exported the animation directly into his fbx.


Did UMotion print any error/warning messages while exporting your animation (in the export log window)?

Please try the following: Make a temporary copy of your character's fbx and change it to generic. It should now play the animation correctly (and thus prove that UMotion exported the animation correctly).


If that is the case, we need to find out why the humanoid animation system is adding some differences to the pose:

  • In the animation preview window in the Inspector, check if the toggling the "IK" button makes a difference.
  • Check the root motion settings (set all to "Original", try enabling the "Bake into pose" setting).

Please note that subtle differences are a side-effect of the humanoid animation system's re-targeting capability and are not completely avoidable. If you don't need to play this animation on different characters then you don't need humanoid thus switching to generic would be recommended (generic plays the animation directly on your character without involving the lossy animation re-targeting). More info about humanoid: https://blogs.unity3d.com/2014/05/26/mecanim-humanoids/

Best regards,
Peter

Hi Peter,

thank you again for your prompt reply. I tried the following:

  1. Just switch the existing fbx with the animation in it to Generic. This did not change anything.
  2. I reverted the fbx to its orginial, without any animations. Then duplicated it, switched one of them to Generic, one to Humanoid. Exported into both from UMotion, no export errors. Please see attached images of both fbx files (one Humanoid, one Generic). The animation looks the same in both, none of them as expected.
  3. I also tried toggling the IK button and root motion settings in the import. Those settings moved the character as a whole, but did not change his appearance

If you want I could provide you with the animation files so you can have a look yourself?

Hi Peter, here is a unitypackage containing my animation files. Please note that I named the files to make clear what they are:

ORIGINAL_ is the model in T-Pose

MOCAP_ is the fbx that comes directly from our Motion Capture Studio

DUPLICATED_ is one of the models of my previous post, including the exported animation, for reference (the one with Generic animations)

EXPORT_ is the fbx that UMotion exports when I export into an extra fbx

UMOTION_ is the UMotion project file

I am trying to put the Mocap-Data onto the character and make some small fixes to it, like cutting away some frames and adjusting foot positions.

There's also a test scene and the chair. I did not include UMotion stuff because I wasn't sure if you want those flying around the interwebs.

Download link (will expire in a couple of days): https://cloud.jensbahr.com/index.php/s/yrNhE4hhpHQ4i5l



Hi Jens,
thank you very much for sending the files. This makes it easier for me to assist you.

I've checked them and it looks like the exported animation is correct. The weird pose is in the first frame of your animation (in UMotion and in the exported *.FBX). I compared the exported animation with the UMotion animation frame by frame (by syncing Unity's Animation Window with UMotion) and they are the same:

Best regards,
Peter

Hi Peter,

thank you for looking at the files. What a weird situation! It's not behaving that way on my PC at all. Here, it's not just the first frame but all of them. Let me attach a video that shows

-> first, the import preview of the "DUPLICATED_" with a playing animation shows him in the weird pose for the whole animation

-> then I switch to the Unity Animation and skip around, showing the animation

-> then, to make double-sure, I add the "DUPLICATED_" animation to the Animator again

-> then, I play the game and you see that he is in fact moving, but very little and in his weird position

I wonder: why is it working for you and not me? What could I be missing?

Hi Jens,
I'm sorry that might have been my mistake, I re-imported the package and now it's not working either (I probably re-exported the animation into the "DUPLICATED_" *.fbx and forgot about it).

Looking at the DUPLICATED_ animation, it looks like a lot of the animation curves are missing (it only has curves for a few bones/transforms). There has been a bug in the versions before UMotion V1.21 that caused these symptoms when exporting to *.FBX and not having the base layer selected. In your original post you mentioned that you are using UMotion V1.21 (which has a fix for this issue), could you please double check if your version really is V1.21 (in the Clip Editor click on Help --> About UMotion...)?

Anyway here is how it works for me:

1) Imported your *.unitpackage into a fesh Unity project.

2) Imported UMotion V1.21

3) Dragged the original and duplicated character into the scene

4) Opened the UMotion project file, dragged the original character to the Pose Editor

5) Exported the animation

6) The animation works as expected (in the Inspector preview and using the Animation Window on the character).

Best regards,
Peter

Answer

Hi Peter,

thank you so much for your continued support. I have updated UMotion and it works - as you suspected. Sorry about the wrong info in my first post; I had looked up the UMotion version number in the wrong place and thought it was up to date.

Anyhow, thank you so much for your awesome support! I gave you a review on the asset store and will send you a key for our game once it's finished :-) Let me know if there is anything else I can do to express my gratitude.

Best,
Jens

Glad to hear that it works now :-) Thanks for the review, that means a lot me.


Thanks for offering a key to your game. Looking forward to go hands on.

Best regards,
Peter