Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
  4. Join us on Thursday, September 29, for a day with Unity's SRP teams here on the forum or on Reddit, and discuss topics around URP, HDRP, and the Scriptable Render Pipeline in general.
    Dismiss Notice

Official Ongoing humanoid issues in Animation Rigging

Discussion in 'Animation Rigging' started by simonbz, Mar 23, 2021.

  1. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hello, I'd like to shed some light on the progress that's been made on the humanoid issues found in Animation Rigging. There are a lot of threads on this sub-forum about it, and I hope I can help clear out some of the confusion about it.

    There were a lot of different issues around humanoid that have been addressed recently. The more recent fixes should be available in 2021.2 soon when it reaches beta.

    Nested Humanoid hierarchy (Fixed in 2020.2)

    Related bugs: 1259490

    Upon retargeting, the humanoid character is offset. The more constraints are used, the bigger the offset. The core issue in this case was that retargeting didn't account for the parent transform in which the hierarchy was nested. This has been fixed for a while now and shouldn't be an issue anymore.

    Humanoid hierarchy with scaled root (Fixed in 2021.2)

    Related bugs: 1266529

    Upon retargeting, the humanoid character is offset. Similarly to the previous issue, the more constraints are in use, the bigger the offset. In this case, the core issue was a scale value that's been set on the root node in the hierarchy. Unfortunately, this scale was not taken into account properly during retargeting and ended up adding an offset on the character's hips.
    case 1266529.png

    Reworking the model to remove any scaling will solve the problem.

    Humanoid hierarchy with missing bones (Fixed in 2021.2)

    Related bugs: 1214897 1309847 1314384

    Upon retargeting, the humanoid character hips are bent. The animation system has to adjust the humanoid pose to account for the missing bones during retargeting. This adjustment is currently applied for every constraints while it should have only been done once.

    case 1214897.png

    This issue can be avoided by reworking the character skeleton to avoid leaving missing bones in the avatar.

    Final word

    I encourage users to try out the workarounds to see if it fixes their issues. Also, try out the 2021.2 beta when it becomes available. If neither the upcoming beta nor the workarounds address your issues, please log a new bug report using the Unity bug reporter with your issue so that we can take a look.

    Cheers!
     
    Last edited: Oct 27, 2021
    ZeroZold, Charlivi and Grant151 like this.
  2. cbadenhausen

    cbadenhausen

    Joined:
    Dec 25, 2020
    Posts:
    6
    I'm having a bug where the character gets offset and starts floating as you described. I tried setting the scaling to 1 for the root but I was still getting this bug. Any ideas how to fix this?
     
  3. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Can you show what your humanoid setup looks like (like in my own examples)? Are there missing bones in your configuration? Are there other scale values applied on your character?
     
  4. cbadenhausen

    cbadenhausen

    Joined:
    Dec 25, 2020
    Posts:
    6
    I am simply using characters from https://readyplayer.me/. The root was scaled so I tried setting it to 1,1,1 but I was still getting the problem. Other bones were scaled but I tried setting almost everyone to 1,1,1 and still issues. I'll check the missing bone configuration but other than that is there any other version of animation rigging I can upgrade or downgrade to avoid this issue?
     
  5. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Animation Rigging is not the problem here. It is a core Animation C# Jobs issue and should be fixed in Unity 2021.2 when it becomes available as stated in my initial post.

    Otherwise, simply changing the scale values on your prefab character won't change anything. You need to adjust the scale on the avatar directly and remove scaling there. If you select your FBX asset in the model importer you can access the avatar configuration on the Rigs tab.

    Screen Shot 2021-04-12 at 1.11.03 PM.png
     
  6. TheDelhiDuck

    TheDelhiDuck

    Joined:
    Aug 29, 2014
    Posts:
    34
    Hi I have a problem where intermediate bones between mapped humanoid bones have their constrained location overwritten. I have an extra Spine2 joint that isn't defined as part of the humanoid structure, but sits between Spine & Chest.
    I have an example where I created a ChainIK constraint between Spine1_M(Spine) through to Chest_M(Upper Chest). There is no rotation on Spine 2 when the rig is running on transforms in the humanoid hierarchy. I created an exact replica of the spine rig outside the humanoid hierarchy and all transforms rotate as expected. My understanding is that the rigging constraints execute after all the mapped humanoid bones have been written to the their respective transforms.
    upload_2021-4-22_14-28-18.png

    upload_2021-4-22_14-29-44.png

    upload_2021-4-22_14-28-32.png
     

    Attached Files:

    Last edited: Apr 22, 2021
  7. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    552
    Hi Simon, thanks for the updates.

    Is there a fix for this on 2019(.4) LTS? Or maybe workarounds?
    I checked all the scale on the bones and it is all (1,1,1) but the parent of the model (gameobject holder) is scaled to 13,13,13 so the offset is quite large.

    Thanks
     
  8. giantkilleroverunity3d

    giantkilleroverunity3d

    Joined:
    Feb 28, 2014
    Posts:
    363
    @simonbz The gumbone on my model is pointing up from Unity's rigging setup on an imported FBX.
    I want to place a target in front to rotate, not tilt the head side to side.
    I tried adjusting the bone like in first picture. When I press play the gum bone resets back to default pointing up.
    It has nothing to do with the target but the gumbone then updates to point to the target rotating the whole head with it.
    But when I move the target the IK then follows.
    I have been making great progress with this model but every new step creates a new dilemna.
    Thank you for any input.
    upload_2021-5-10_11-52-43.png
    upload_2021-5-10_11-56-19.png
    upload_2021-5-10_11-55-0.png
     
  9. giantkilleroverunity3d

    giantkilleroverunity3d

    Joined:
    Feb 28, 2014
    Posts:
    363
    The Animation is self destructive. You make a change and it is done even if you didnt save. The files are written whether you like it or not. There is no history but ctl-Z.
    The Unity community in this arena is not making the correct amount of progress. Google it.
    And yes my model is not simple. But I followed the tuts and I now waste time trying to adjust data items in numerous disconnected ways.
    We are being used to find and report Unity's bugs during our dev workflow, if that is what you want to call this.
    The animation variables are not connected correctly with the curves keyframe values.
    Working on transforms in the inspector does not reflect in either the curves or dopesheet.
    There are values that are set in the rig import that one has to go and readjust in the animation window.
    I have been a programmer for 43 years. I know S*** when I see it. And I am not alone.
    If I get exiled for this oh well.
     
  10. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hi, I believe this is a limitation of the humanoid system for in-between spine bones.

    In a nutshell, here is how animation rigging works when used with a humanoid rig.
    - Human to Transform retargeting.
    - Constraint evaluation.
    - Transform to Human retargeting.

    While we're allowing custom constraints to modify the human rig through the transform system, these will ultimately be reconverted back to human curves and the information you've set on spine2 will be lost. Since the human rig has no prior knowledge of the intermediate bone, it does the best it can and treats spine and spine2 as a single "bone".
     
  11. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
  12. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    I'm not sure I understand what is your setup for this character or what is the issue exactly.

    What exactly are you trying to keyframe here? I've said that before in the forum, but if you're trying to keyframe a humanoid clip, you'll have a hard time as humanoid is not an authoring format. The best way to keyframe constraints for a humanoid character is to either use a layer on the state machine with override clips to drive your constraints or use the timeline with an override layer.

    You won't be able to do much with an empty humanoid clip, as a human always defaults to its resting pose (the crouching position) and this is a highly unintuitive pose to work with for authoring.

    Please, keep a civil tongue on the forum. I answer posts when I can, but I don't have much time for it anymore. I feel like some of your questions are more humanoid specific workflows, so you may find more help on the animation forum directly. Otherwise, if you feel like something is a bug and you can isolate a repro, please log us a bug so we can take a look at it. It's definitely the best way to help us.
     
  13. TheDelhiDuck

    TheDelhiDuck

    Joined:
    Aug 29, 2014
    Posts:
    34
    Cool, thanks for the info.
     
  14. giantkilleroverunity3d

    giantkilleroverunity3d

    Joined:
    Feb 28, 2014
    Posts:
    363
    Unit 2020.3.4f1
    If there is no answer for this then it is a bug.
    The Y data doesn't match the curve data.
    My character rises up .35 in preview. The curve shows 10.0. I change the Y data to 10 in preview, not in preview, in the curve but the data goes back to 10.35. The animation is writable as I made a copy.
    upload_2021-6-22_12-47-21.png
    The model also has this:
    upload_2021-6-22_13-2-45.png
    I am trying to find the workflow cohesion in the FBX import/animation, Unity humanoid rigging and the Unity animation.

    I can achieve IK without the animator controller in the animator component for now.
     
    Last edited: Jun 22, 2021
  15. giantkilleroverunity3d

    giantkilleroverunity3d

    Joined:
    Feb 28, 2014
    Posts:
    363
    This is using an imported Maximo with no animation.
    Select the root Gameobject in the hierarchy is all. There is no animation in the rigging inspector.
    The Gameobject has no animation controller at this moment.
    Do not use the animation controller option in the main menu drop down.
    Then got down to the animation timeline window to expose a totally blank animation environment.
    Refer to button picture.
    Pressing this button creates the default position for the model from the model you see and does not put the model in the hanging crouch.
    I have achieved what I wanted.
    Prior to this I have been using the animation selector drop down and creating a clip from that.
    So there is the disconnect. That button also creates the default animation controller.
    The one off the Main drop down seems to create an uninitialized controller, from there the hanging crouch position is activated. Obviously the main menu drop down creates a blank controller with no respect as to the model gameobject selected in the hierarchy.
    Another step achieved. Now the static pose from the import is sustained!
    Unity: write me a check for $100k for debugging this or remit to me a free professional license.
    upload_2021-6-22_14-49-30.png
    If you do not use this button you are in for one hell of a nightmare.

    Caveat: Once you start adding animation curves to the IK GO you no longer have the ability to move the IK GOs in the scene. With no animation curve properties on an IK GO you are free to move the IK GO only in the scene during game play. You can use the animation record button to snag the transform data but you get one shot as after that you can not move the IKGO unless you start another animation. Then you can copy keyframes around into other timelines.
     
    Last edited: Jun 22, 2021
  16. wifitofu

    wifitofu

    Joined:
    May 18, 2021
    Posts:
    4
    So I'm getting the sinking problem, where the more layers with constraints I add to a rig builder, the more my model sinks into the ground and contorts oddly during certain animations. For me, this seems to only be the case with animations that rotate the root node in their keyframes. Updating to the 2021.2 beta completely breaks my project and I have a feeling that wouldn't help anyway. Any suggestions?
     
  17. giantkilleroverunity3d

    giantkilleroverunity3d

    Joined:
    Feb 28, 2014
    Posts:
    363
    My answer to use Umotion. I struggled into endless array of issues every time I dabbled with Unity animation tools.
    After 6 months I was in between 'a low sloping forever learning curve' and 'am I running into things that really dont work?'
    The learning curve in Umotion was 2 hours then boom I was back to character posing, animating and my artwork. I will not look back except to clean out many, many garbaged attempts.
    I use Blender to export meshes, Mixamo to rig that, then Umotion to position and animate.
    In Unity though when I modify clips the exports dont seem to take effect right away.
    I believe it has something to do with the ownership the OS has on the folders and files.
    But I am back to doing real work instead of juggling mysteries that are not mine.
     
  18. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    The issues you're talking about should be fixed in 2021.2. It's a bummer that your project breaks when upgrading though. If you can isolate your character prefab and your animation rigging rig, try and see if you can still reproduce the issue in 2021.2. If you can still reproduce the issue in 2021.2, then please, log us a bug for it.

    Otherwise, as mentioned in the first post, the reason why your character twists is because of missing/unknown bones in the topology. The humanoid retargeting system will try to compensate for these bones, but will do so for every constraint it evaluates. We have reworked how this works in 2021.2 to fix the problem.

    If you have access to a DCC software, I suggest reworking your character topology (mostly around the hips/root bone) to provide something that humanoid will easily retarget without having to compensate the animation.
     
  19. cbadenhausen

    cbadenhausen

    Joined:
    Dec 25, 2020
    Posts:
    6
    Hey there, I know I asked about this post a while ago. I ended up stepping away from my project for a few months although I've gotten back into it recently! However, still having the same issue of my character being offset when using the rig builder causing the character too float. Whenever I run my project the hips bones y and z axis go from 0 to 100. My unity project is at version 2020.3.4f1.

    FIXED IT! Upgrade to 2021.2 beta
     
    Last edited: Aug 18, 2021
  20. SirKnightDragoon

    SirKnightDragoon

    Joined:
    Mar 22, 2016
    Posts:
    21
    upload_2021-9-6_22-29-27.png

    Hi, I just added the package, and I'm trying a really basic test, and I'm getting this error?
     
  21. SirKnightDragoon

    SirKnightDragoon

    Joined:
    Mar 22, 2016
    Posts:
    21

    I fix it... So

    thats way:

    upload_2021-9-8_11-42-2.png

    If the "Rig" is inside my Player, but here... I get the error.

    upload_2021-9-8_11-42-49.png

    But, if I move my Rig inside my GameObject "Skeleton", its fix all error.

    So the Rig need to be in the same GameObject of the "skeleton".
     

    Attached Files:

  22. lacas8282

    lacas8282

    Joined:
    Apr 25, 2015
    Posts:
    36
    I had this floating bug. I changed the armature scale from 100 to 1. And it looks like the thing was gone. But a new issue come. Basically it looks like the bones swapped x, y, z axis. So when I put the ref_right_hand_target to my gun then the player's arm just twisted and the hand is weird... If I put that ref handle to my player's feet, on the ground than the right hand is on the gun.. So something happening. Maybe a 90 degrees swap somehow.
     
  23. qasim12345

    qasim12345

    Joined:
    May 26, 2021
    Posts:
    2
    Thanks
     
  24. wtd_rename

    wtd_rename

    Joined:
    Jun 29, 2020
    Posts:
    5
    hey guys so, I setup all the scales to 1 in hierachy, the root bones and the scale factor to 1, I got all bones there are no missing and I still have this problem I am on 2021.1.21f1

    eddit, I fixed my problems by exporting the blend file as fbx with new properties: apply scalings fbx all and only with the tick on apply unit, then I in unity I setup the scales to 1 as every one pointed above
     
    Last edited: Nov 21, 2021
  25. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Did you try with version 2021.2? As mentioned in my original post, all bug fixes should be available in the current Unity release. If you still have issues with 2021.2, please log us a bug using the Unity bug reporter to let us know about it.
     
  26. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,713
    I was using Unity 2021.1.19f1. Experienced an issue where my humanoid character would twist his head 90 degrees to the left while playing the walking animation if the Rig Builder component was active even if no rig was affecting the character. After googling I ended up here and tried the project in 2021.2.7f1 and I'm happy to say he's now fixed.

    I do not have missing bones or a scaled root, at least afaik, so I can't immediately say that the listed issues and fixes apply to me, but clearly something is fixed that also helped me.

    Great work! I think this is maybe the first time ever that upgrading my Unity version has immediately fixed a problem I was having. :p
     
  27. Babarellio

    Babarellio

    Joined:
    Feb 6, 2022
    Posts:
    1
    Hey SimonBZ!

    One famous issue is when you use a humanoid character with some animations and also a rigging package with some constraints and IK pivots/points. When you add an animation keyframes for those IK targets first of all those doesn't produce any effect and Unity's Animator has a message "Binding issue: some generic clips bla bla...". Though, the IK "animation" works if I change the transforms and weights in code. Why it sucks in animator?
    Will we have a possibility finally to animate constraints and weights in Animator for humanoid rigs? It will give it a whole new sense. It is so easy and comfortable to animate in animator rather than try to guess the correct slerp/lerp in code. Moreover, when it is an animation clip you can make cool transitions, etc. You know what I am talking about, right?

    Alternatively, I know it is against the documentation, but would it be possible to allow nested animations? It is the same as above, though a different angle. E.g. main animator is on game object and a second animator which animates weights and constraints is on RigLayers object within GameObject. This somehow already works if the Nested Animator's update is set to Physics or changed to something and back to Normal in Play mode. Any explanation?
     
  28. Duude

    Duude

    Joined:
    Jul 29, 2018
    Posts:
    1
    Yesterday got same issue.
    For me it was based on "third person template" and "UMA 2 dynamic character avatar"
    "Player" object stuck in air, until "Rig Builder" component was disabled, no move on "Third person controller"
    Unity version: 2021.3.2f1 LTS
    Way to reproduce: Create new project with "Third person Template"
    Setup Rig Builder, Add object to character root(1), setup rig(2) upload_2022-5-20_11-48-5.png upload_2022-5-20_11-48-29.png
    After entering Play Mode - character will stuck and won't move (you could move character up a bit, to see - it will stuck in a "jump" animation)
    The way to fix this for me was setting flag "Apply root motion" of "Animator" component - on that step - character will start to move, but the speed will be slow - i thought the problem in a "root transform baking", but no succes to fix it by changing those values.
    Somehow, mixamo animations with rig fixed character speed.
    The last way to fix, and probably most simulate-right, is to make object to be a part of Skeleton object, in that way you dont need to apply root motion, or change values of Baking root transform of animations
    That works with Third Person template rig, mixamo rig and Dynamic Character Avatar rig
    Hope it will be halpful for someone
    upload_2022-5-20_11-48-5.png upload_2022-5-20_11-48-29.png
     
unityunity