Answered

Weird behaviour with humanoid Avatar Mask that contains extra bone

Corvostudio 4 years ago updated 4 years ago 2

Hello.
I animated some characters with uMotion and in particular with child-of constraint option.
Here's what I've done

Image 374


Basically the rifle attached to right hand (weapon is child of a bone called "WeaponJnt" that is contained in imported skeleton. I did this just as I learned from another topic I made where I added the weapon transform as new transform in prefab, but now i created a new bone in Autodesk Maya, so I'm using an humanoid skeleton with an extra bone)

Everything works just great when I just animate the character with Mechanim, without using Avatar Masks (As you can see, rifle became child of constraint of left hand, so even if weapon is under an extra bone it get recognized from animation):

Image 375

However I still have the same problem I had when i was using a new transform instead of an extra bone as weapon transform; The mask dosn't get applied on the rifle transform, wich dosn't get animated and dosn't follow left hand during animation.
Mask seems correctly implemented.

Image 376

After watching tons of similar posts I guess this should be working quite good;The animation can see and animate the extra bone, bvut the mask, even if the bone is imported, visible and ticked, got ignored. 
Also the name, parent transform etc of the imported extra bone haven't been modified in character prefab.

UMotion Version:
1.25
Unity Version:
2019.4.1f1

Answer

Answer
Answered

Hi,

thank you very much for your support request.

If the animation works correctly after being exported from UMotion (and not using the avatar mask), then UMotion did everything correct (= the animation is OK). So the issue must be related to your animator controller/avatar mask setup. To debug such issues, the easiest way would be to compare the local rotation/local position values of each bone of the not working setup with the working setup. Then you can see at which bone the differences start and then check why that bone is manipulated by the Animator component in such a way. Please note that from the last spine bone on, all bones need to have the correct orientation/position otherwise your hands won't reach the weapon correctly. Maybe your second layer in the animator controller is additive instead of override? Or the blending weight is not 1?


Best regards,
Peter

Answer
Answered

Hi,

thank you very much for your support request.

If the animation works correctly after being exported from UMotion (and not using the avatar mask), then UMotion did everything correct (= the animation is OK). So the issue must be related to your animator controller/avatar mask setup. To debug such issues, the easiest way would be to compare the local rotation/local position values of each bone of the not working setup with the working setup. Then you can see at which bone the differences start and then check why that bone is manipulated by the Animator component in such a way. Please note that from the last spine bone on, all bones need to have the correct orientation/position otherwise your hands won't reach the weapon correctly. Maybe your second layer in the animator controller is additive instead of override? Or the blending weight is not 1?


Best regards,
Peter

Hello again!
First of all, thank you for your really quick reply.

Yeah, uMotion did everything alright, but since this asset is commonly used for extra bones animations I thought I could find answers here. Anyway I just managed to solve it.
Eeverything was set upped correctly, the mask and the mechanim controller, and the solution seems pretty strange to me:
I selected my character and in "Inspector" in the "Rig" tab I selected "Optimize Game Objects" and manually selected all the needed bones. For some reasons without that manual selection the  animations were working on both humanoid and extra bones but the mask were working only on humanoid bones.
Thank you again, your software is awesome and your assistance too.