Answered

Animation export has keys for bones I didn't animate

thenewunfungames 5 years ago updated by Peter - Soxware Developer 5 years ago 2

When I export an animation it's showing keys for a lot of bones I didn't animate. This is a huge problem because I am only animating the right arm to draw a weapon, so when I play this on layer 1, it's over writing the rest of the figure's animation because it thinks more than just the arm is being animated.

I tried just removing the extra keys in the unity animation window, but the legs got completely out of whack.

UMotion Version:
1.21
Unity Version:
2019

Answer

Answer
Answered

Hi,
thank you very much for your support request.

I guess your model is of type humanoid? For a humanoid animation to be valid it always needs animations for all the muscles of all the required humanoid bones. So UMotion's behavior is correct when creating all those muscle curves. When you manually delete these additional muscle curves, your animation get's invalid and thus you get incorrect results.

"This is a huge problem because I am only animating the right arm to draw a weapon, so when I play this on layer 1, it's over writing the rest of the figure's animation because it thinks more than just the arm is being animated."

The correct way of doing this would be by using an avatar mask to define the parts of the animation that your layer should use:

Generic animations work they way you would have expected (only the bones you animate are being exported). This is because generic is a regular/classic animation and "humanoid" is a regular animation converted into the normalized "muscle space" that can be re-targeted to other characters: https://blogs.unity3d.com/2014/05/26/mecanim-humanoids/

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

Best regard,

Peter

I should point out that, in the timeline, it only shows keys for the bones I edited.  However, after exporting the animation and looking at it in unity's animation window - there are keys for a lot of bones I did not animate. I tried removing them, but then my model goes crazy.

Answer
Answered

Hi,
thank you very much for your support request.

I guess your model is of type humanoid? For a humanoid animation to be valid it always needs animations for all the muscles of all the required humanoid bones. So UMotion's behavior is correct when creating all those muscle curves. When you manually delete these additional muscle curves, your animation get's invalid and thus you get incorrect results.

"This is a huge problem because I am only animating the right arm to draw a weapon, so when I play this on layer 1, it's over writing the rest of the figure's animation because it thinks more than just the arm is being animated."

The correct way of doing this would be by using an avatar mask to define the parts of the animation that your layer should use:

Generic animations work they way you would have expected (only the bones you animate are being exported). This is because generic is a regular/classic animation and "humanoid" is a regular animation converted into the normalized "muscle space" that can be re-targeted to other characters: https://blogs.unity3d.com/2014/05/26/mecanim-humanoids/

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

Best regard,

Peter