Is it possible to get a humanoid Rig in unity to animate extra bones that aren’t set on the humanoid rig in unity?
We have a few extra bones we need to animate on our character but I’d also like to take advantage of the humanoid ‘Mirror’ functionality. The extra bones we want to animate are weapon attachment points and also a helmet attachment point (that bobs around when the character runs so we can’t just attach it to the head). We’ve also got a couple extra bones in the face of our character to move his eyebrows and get a little more expression going.
It seems odd to me that the Humanoid Rig can’t handle extra bones as this seems severely limiting to anyone that wants to use it for a character that has a tail or a hair or anything like that…
Is there something I’m missing? Or is it simply not possible to have animating bones that aren’t part of the standard Unity Humanoid Rig.
P.S. I know I can use a Generic Rig but this means I cannot use the Mirror function in the Animator and I’ll need to double up on all our animations on import… increasing data and making the animator controller more complex so if i can use a humanoid I’d like to.
I don’t think it’s possible to append additional bones as the slots that you can assign bones to on an Avatar asset for Humanoids appears to be fixed. If there’s some hidden button that allows you to add additional slots for unique appendages such as tails, I haven’t found it yet.
It feels odd that it’s limited to Humanoid skeletons only because from my understanding, isn’t retargeting just transferring transform data from one bone to another? That would mean that as long as two hierarchies are similar to each other, it’ll retarget just fine, quadruped to quadruped, biped to biped, ship to ship, etc. so having it limited only to bipeds seems rather silly to me.
Yes you can animate extra bone with a Humanoid rig, by default extra bone animation are not imported. You need to explicitly open the mask foldout in your model importer setting and select the extra bone that you would like to animate.
That been said, extra bone animation won’t be retargeted automatically like all the human bone. The only way to have extra bone retargeting is to have identical rigs: same transform hierarchy with same name.
Human bone are retargeted using the mecanim muscle retargeter: a FK pose from the source avatar is converted to a muscle pose(there is a predefined set of muscle and this is why we have predefined set of human bone) and then the muscle pose is converted to destination avatar FK pose.
For Extra bone animation, if both rig match the animation curves are simply played on the destination avatar. This has some limitation like if both rig match but have different proportion, longer arm or leg, the retargeting may not look good.
Mecanim.Dev: Hello there, if I may ask, does mecanim actually do any retargeting in scope of modifying animation data of extra bones, or does it simply copy/transfer matching tracks? To me it sounds it only does matching of object A animation tracks to object B.
Exactly, animation curve from A are used directly to animate B.
This is why i’m saying that if both rig have different proportion you may not get the same exact result.
I have selected the extra bones in the importer mask for all the animations and they were all already checked so something else is going wrong here… I’ve logged a bug (case #736277). It’s got my character setup with a Humanoid Rig and another with a Generic Rig so you can see the difference.
I noticed the Humanoid Rig has a warning on the importer that you can see in the image, would that mess with the extra bone animations?
So just out of curiosity I uncheck the Hero_Mesh box on the mask and now it’s all working, minus the jaw looking a little bit different due to the translation warning.
What I find strange though is that with that box checked on a Generic Rig it all works fine so it seems there’s still some issue here.
I know this is an old thread but it seems like the Mirror function for extra bones doesn’t work well, extra bone’s animation getting pretty weird after mirror, anybody got a clue about that? thanks.
hey, really old thread but probably the only place i can really ask anyone for help. ive been trying to get an animation to work with the tail, i selected and enabled the tail bones, not the mesh, but it still doesnt animate. im not sure if its supposed to show on the avatar but it isnt enabled there either. if anyone knows why this may not be working for me, please help
Same issue, above fixes didn’t fix it for me. I still do not have the extra bones animated even if I toggled all nodes in the avatar mask.
I am also pretty sure I have the same transform hierarchy. My .fbx object is like this in the Project window:
▽ Prefab
Arm
Mesh
Avatar
And in the avatar mask section of the import window, it shows:
Use | Node Name
√ Arm
√ Mesh
So by @Mecanim-Dev 's suggestion, the animation should animate the extra bones; but it doesn’t. If I change my model to a generic rig, then I see the extra bone animations.
Coming back to this threat I just wanted to leave a post with note
Humanoid rig has issue dealing with animation that are made far from center of world (something like 100 meter from center, for cinematic purpose), SPECIALLY for extra bones.
the precision goes all crazy, so I just decided to stick with generic, ik thing I will need to rely on some third party asset like Human IK.
We are also stuck here. This is a terrible situation. We cannot create any facial animations because we are relying on eyebrow and lip bones that do not exist in the humanoid rig…
Where can I even find that Mask Foldout on Unity 2021.2? Seems like it just doesn’t exist anywhere. Our model does not have animations within. We are using external animation files instead.
Seconding this, this is extremely annoying when dealing with characters that have a lot of animations.
We use some third party animations as well so our rigs need to be Humanoid for the retargeting. Sorry but it baffles me there isn’t a checkbox to just “Include all bones in Humanoid animations”. Having to manually set the mask on each animation is a huge workflow impedance.
Just put the script in an Editor folder somewhere in your Assets (can be a sub-folder), and edit the restrictToPathsContaining line to choose what paths you want to restrict to. Partial paths supported.
so my problem was how i transitioned between animations so its worth checking youre code if youre using ANYTHING BUT animation.play in code (you wont get this problem if not animating through your own code and are using something like unitys animation tab with bools to trigger) and the above post is a problem with humanoid rig, ANY BONES NOT MADE FOR THE HUMANOID RIG WILL NOT WORK WITH THE HUMANOID RIG ENABLED, for any characters like the above post or my character with a tail and no legs (and a melee weapon as a bone from blender because i use the dynamic parent add on to animate that) you need to use another rig type, it may be the same with extra bones like shoulder turrets or weapons even on a human rig but i havent tested this