Not a bug

Linear root motion not linear after export

florianbernard13 3 weeks ago updated by Peter - Soxware Developer 2 weeks ago 2

Hello,

I have a fairly simple run animation with a linear Z root motion as you see on the screenshot. Though after I export the clip, the Z root motion is not linear. Why? I've tried multiple Export settings (generate, fbx..) but get the same issue every time.

Any help would be appreciated. Thanks.

Image 1489

Image 1490

UMotion Version:
Latest
Unity Version:
2022.3

Answer

Answer
Not a bug

Hi Florian,
thank you very much for your support request. The "issue" lies in the nature of how the humanoid animation system works. The humanoid animation system takes the animation you authored in UMotion, re-samples it and converts it into an abstracted humanoid format. In this abstract format, the root is defined as the center of mass of the character, not the actual root bone anymore. These center of mass changes (due to limb movement) introduce the small displacements you see in your second screenshot.
This is also the reason why the coordinate system is different, as the second screenshot shows humanoid internal coordinates which differ from your character's actual coordinates used in UMotion (which are based on how the bones have been oriented during the rigging process).

Anyway, if this small errors bother you, you shouldn't use humanoid at all. Humanoid by nature only tries to approximate the source animation, it never plays it 100% accurate (this is called animation re-targeting). This comes with a benefit though as it allows the humanoid animation system to play the same animation on different characters (with varying accuracy, though).

Generic on the other hand is always 100% accurate. So for animations where precision matters and you do not need animation re-targeting capabilities, always use generic instead.

I highly recommend reading this blog post to understand what "humanoid" is all about: https://unity.com/de/blog/engine-platform/mecanim-humanoids

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

Best regards,
Peter

GOOD, I'M SATISFIED

Thank you for your detailed feedback. 

Satisfaction mark by florianbernard13 2 weeks ago

(note that for some reason movement Z is displayed as Y on the Clip Editor)

Answer
Not a bug

Hi Florian,
thank you very much for your support request. The "issue" lies in the nature of how the humanoid animation system works. The humanoid animation system takes the animation you authored in UMotion, re-samples it and converts it into an abstracted humanoid format. In this abstract format, the root is defined as the center of mass of the character, not the actual root bone anymore. These center of mass changes (due to limb movement) introduce the small displacements you see in your second screenshot.
This is also the reason why the coordinate system is different, as the second screenshot shows humanoid internal coordinates which differ from your character's actual coordinates used in UMotion (which are based on how the bones have been oriented during the rigging process).

Anyway, if this small errors bother you, you shouldn't use humanoid at all. Humanoid by nature only tries to approximate the source animation, it never plays it 100% accurate (this is called animation re-targeting). This comes with a benefit though as it allows the humanoid animation system to play the same animation on different characters (with varying accuracy, though).

Generic on the other hand is always 100% accurate. So for animations where precision matters and you do not need animation re-targeting capabilities, always use generic instead.

I highly recommend reading this blog post to understand what "humanoid" is all about: https://unity.com/de/blog/engine-platform/mecanim-humanoids

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

Best regards,
Peter