Not a bug

Playback on Clip Editor and the exported animation do not match.

Anonymous 5 years ago updated by Peter - Soxware Developer 5 years ago 3

Playback on Clip Editor and the exported animation do not match.


Clip Editor:

Image 9



Exported animation:

Image 10



Please pay attention to the left hand.

In Clip Editor, the hand holds the grip,

In the exported animation, the position of the grip is wrong.

Upload the project repository to GitHub.
https://github.com/MatchaChoco010/UMotionProReport

I hope this report will help you develop UMotion Pro.

UMotion Version:
1.19p02
Unity Version:
2019.2.3f1

Answer

Answer
Not a bug

Hi,

thank you very much for reaching out.

I've taken a look at your repo project. What you experience is just a side-effect of the "lossy" nature of the humanoid animation system. In UMotion, when you create a humanoid animation you actually create a regular (i.e. like what Unity calls "generic") animation (just like you would in Blender, etc.). Then when you export your animation, Unity converts the animation to the "lossy" humanoid animation format. Humanoid by it's nature will introduce small pose errors on each bone. Your weapon is parented to the shoulder and thus the error of the shoulder bone causes the weapon to get slightly differently orientated. Thus the weapon handles are not in the same place anymore thus also the hands seem misaligned.

For this situation, the humanoid animation system has a built-in IK mode that will correct position error of the hands by applying an IK pass (please see blog post linked below). I think if you would parent your gun to the right hand instead of the shoulder, you would get much better results.

It's really important to understand what humanoid does under the hood when working with it as it can introduce lots of problems like these: https://blogs.unity3d.com/2014/05/26/mecanim-humanoids/

Humanoid only has benefits when you want to share the same animation with various characters. In all the other cases it introduces more harm than good (more CPU consumption, less flexibility, visible errors in the animation). I think in your case it might be the easiest solution to just switch to generic (instead of humanoid). That would mean that you get always precisely the animation that you created without any re-targeting errors. If you use mocap animations (for walking etc.) on your character you need to convert them to generic too.

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

Best regards,
Peter

Answer
Not a bug

Hi,

thank you very much for reaching out.

I've taken a look at your repo project. What you experience is just a side-effect of the "lossy" nature of the humanoid animation system. In UMotion, when you create a humanoid animation you actually create a regular (i.e. like what Unity calls "generic") animation (just like you would in Blender, etc.). Then when you export your animation, Unity converts the animation to the "lossy" humanoid animation format. Humanoid by it's nature will introduce small pose errors on each bone. Your weapon is parented to the shoulder and thus the error of the shoulder bone causes the weapon to get slightly differently orientated. Thus the weapon handles are not in the same place anymore thus also the hands seem misaligned.

For this situation, the humanoid animation system has a built-in IK mode that will correct position error of the hands by applying an IK pass (please see blog post linked below). I think if you would parent your gun to the right hand instead of the shoulder, you would get much better results.

It's really important to understand what humanoid does under the hood when working with it as it can introduce lots of problems like these: https://blogs.unity3d.com/2014/05/26/mecanim-humanoids/

Humanoid only has benefits when you want to share the same animation with various characters. In all the other cases it introduces more harm than good (more CPU consumption, less flexibility, visible errors in the animation). I think in your case it might be the easiest solution to just switch to generic (instead of humanoid). That would mean that you get always precisely the animation that you created without any re-targeting errors. If you use mocap animations (for walking etc.) on your character you need to convert them to generic too.

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

Best regards,
Peter

Thank you for your very detailed reply!
I decided to make it generic because I have no plans to share motion with other characters.
I was very helped. Thank you very much!

Yes that's a good decision. I'm glad I could help.

Don't hesitate to contact me in the future.

Best regards,
Peter