Search Unity

Character changes into a broken pose when keying positions

Discussion in 'Timeline' started by arvzg, Aug 19, 2017.

  1. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    I've got a character like this, with an empty timeline with no tracks:



    Now I want to key in some positions and add a Run animation below that. So I press the record button and move her forward a tiny bit, and this happens:

    upload_2017-8-20_1-3-57.png


    Very strange. For reference, these are the components that she has:

    upload_2017-8-20_1-4-30.png

    If I drill down into her rig, her bones have indeed changed positions and rotations to some arbitrary looking numbers, no idea where they came from. She looks like she's in the default muscle testing pose, except if you look under the ground her legs are all messed up:

    upload_2017-8-20_1-6-18.png

    I'm using Unity 2017.1.0p4

    What is happening here?
     
    Last edited: Aug 19, 2017
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    There is a fix for this coming in the next patch. To get around it until then, place your run animation on a track before that one.
     
    arvzg likes this.
  3. Mystiq

    Mystiq

    Joined:
    Aug 31, 2013
    Posts:
    8
    Is this related to one I've seen where my character model centers at 0,0,0 and when I try to move it, the the bones move instead? This seems to fix itself slightly if I remove the root bone from the mesh renderer.
     
  4. sephytreebeard

    sephytreebeard

    Joined:
    Aug 16, 2015
    Posts:
    7
    this is still happening in unity2019.2
     
  5. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    @sephytreebeard - can you provide a repro case, gif or any extra details? The differences in animation tracks between 2017.x and 2019.x is pretty substantial.
     
  6. sephytreebeard

    sephytreebeard

    Joined:
    Aug 16, 2015
    Posts:
    7
    reproduced with adam model(free), etthan model(free) , pbr soldier

    simply added the first keypose transform position when recording,

    having trouble uploading the clip
     
  7. sephytreebeard

    sephytreebeard

    Joined:
    Aug 16, 2015
    Posts:
    7
  8. sephytreebeard

    sephytreebeard

    Joined:
    Aug 16, 2015
    Posts:
    7
  9. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Thanks. I'm a bit surprised that a) we overlooked that, b) we haven't come across it and c) that it wasn't fixed in the many changes to both animation and preview... but you are completely correct. It's still there - but only happens on humanoids.

    I'll open a bug and we will get a fix as soon as possible.
     
  10. Deleted User

    Deleted User

    Guest

    Has this bug been fixed yet in any new releases?
     
  11. Deleted User

    Deleted User

    Guest

    I updated my project to the latest version of Unity (2018.4.10f to 2019.3). Now I can't do anything to fix the rig, like it is programmed to stay broken. It also gives me an error message claiming that humanoid bone rotation is no longer supported.
     
  12. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Unfortunately, the bug (as reported) is still open - although your issue with the rig sounds like a different problem.
     
  13. Deleted User

    Deleted User

    Guest

    If it is of any use to anyone, I exported an FBX model and made my own skeleton with extra bones. This humanoid seems to be working now.
     
  14. fullerfusion

    fullerfusion

    Joined:
    Dec 2, 2018
    Posts:
    23
    Has this bug been fixed yet? I'm using Unity 2019.3.2f1. My character model also goes into a weird broke pose when I create a new animation track in the Timeline. My character is using a Humanoid rig. Once it goes into that broken pose I can't fix it.


    However, when I bring in a different character model and changed its rig to Generic there appears to be no issue with the Timeline. So, Timeline is broken when you try to add an animation track with a Humanoid Rig.
     
    Last edited: Mar 22, 2020
    sephytreebeard likes this.
  15. Maldorath

    Maldorath

    Joined:
    Nov 11, 2016
    Posts:
    2
    Same problem, as of 2019.3.11f1.

    After playing around with it enough I ran into a warning "Keyframing translation on humanoid rig is not supported!" So there you have it. It took quite a bit of playing around before that warning popped up when trying to change Root Position, prompting me to do further research to confirm this limitation.

    Changing Rig Animation Type to Generic works, as fullerfusion mentioned. Select the Root node and then those animations can be shared with other Generic "humanoid" rigs in your game that have the same bone hierarchy structure under that root.

    Otherwise animation will have to be added entirely in a third-party tool such as Blender, prior to importing into Unity.

    It seems like a Unity "fix" could be to simply disable the Animation > Create button for objects based on the Humanoid Animation Type, if possible, along with the warning message above. There are ways around this, but it would at least reduce confusion.
     
    Last edited: May 17, 2020
  16. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Not saying anything that Maldorath isn't, just confirming it.

    Keyframing is supported for Humanoids on the root only (which overrides root motion). If you need to create hierarchical animations in timeline then only Generic is supported.

    And even then, the animation window is better suited to author animation than timeline (the clip can then be brought into timeline).

    (I'm not sure why the warning on the root object though is being displayed...)
     
  17. bowenf3

    bowenf3

    Joined:
    Jan 10, 2021
    Posts:
    1
    Just to confirm this is still happening in 2021. Are there plans to support humanoid keyframing?
     
    Padians likes this.
  18. Padians

    Padians

    Joined:
    Oct 13, 2020
    Posts:
    1
    This is still happening. I am still facing this issue. Anyone found any solution?
     
    WonkyDonky likes this.
  19. kirbyderby2000

    kirbyderby2000

    Joined:
    Apr 28, 2017
    Posts:
    35
    As of Unity 2020.2.1f, I'm still running into this issue when trying to record animations from a character's animation controller.


    upload_2021-6-4_14-27-25.png

    upload_2021-6-4_14-28-5.png
     
  20. ronald-elizondo

    ronald-elizondo

    Joined:
    Jul 13, 2017
    Posts:
    1
    @kirbyderby2000 Did you ever solve this issue? Im in unity 2021 and this issue persists... jw :)
     
  21. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    I don't think it works yet.

    I might have misunderstood, but my understanding is Humanoid animation clips work via "muscles" which can be animated between -1 and +1. E.g. the lower leg (knee down) can go from "straight down" (standing position) to "straight up" (heel of foot kicking your bottom). That allows the humanoid animation clip to work on a range of characters - you define what the two extremes are for the specific character in question. So the "weird position" is all these muscles at value 0 (half way between the two extreme positions). Aka a "chicken dance".

    My understanding is humanoid clips (animating Muscles via an Avatar description) and bone animations (generic) don't mix (there is no support to blend the two sets of values). So you have to decide whether to do everything one way or the other.

    Timeline and Animation Controllers don't play well together. I use Humanoid clips (with Avatar masks) on Timeline. If no animation clip is present, muscles all default to 0 (chicken dance pose). I then add other humanoid clips with avatar masks to control which muscles get controlled by which track. E.g. I start with a full body Run animation clip, then override with different Head or hand animation tracks to say wave at another character while running along.
     
  22. kirbyderby2000

    kirbyderby2000

    Joined:
    Apr 28, 2017
    Posts:
    35
    Yeah I eventually found out that you simply can't make custom keyframed animations in Humanoid animation controllers, it isn't support in Unity yet and I don't think it'll ever be supported. You have to set your animation controller to "Generic" to record custom animations within it. There's no way to use generic custom keyframed animation clips and humanoid animation clips in the same controller (ie you can't use Mixamo animation clips and use generic custom animation clips in the same controller). There are assets on the Unity asset store that allow you to create new humanoid animation clips using custom keyframes or edit already existing humanoid animation clips like Very Animation: https://assetstore.unity.com/packages/tools/animation/very-animation-96826
    However I don't recommend using this tool as it's kind of a pain to get clean looking animations with it and honestly not worth the money given the results I got.

    I know this sounds like a pain in the butt, but I eventually got around this issue by swapping between Humanoid / Generic animation controllers as needed via script in order to play the animation clip type that I needed. The drawback with this method was that there was no tweening between the clips but it was fine for my use case. If that doesn't sound like an ideal solution, then I honestly would recommend trying to make your own animation clips using Blender instead of using Unity.
     
    thorbjorn114 likes this.
  23. Sam-N

    Sam-N

    Joined:
    Mar 4, 2015
    Posts:
    6
    I'm still running into this issues in 2021.1.13... With Unity's own Robot Kyle model. It reverts to the same pose It has when there's an Avatar applied in the Animator (in this case, it's using the Humanoid avatar generated from the Robot Kyle rig). It's appearing fine in the Configure view for t-pose.

    upload_2022-3-29_1-22-49.png

    The weird default pose is the same as the Rig > Configure > Muscles & Settings view.
    upload_2022-3-29_1-23-42.png

    Again, the t-pose is fine, and it appears at the proper position, unlike what's appearing on the Avatar.
    upload_2022-3-29_1-24-40.png

    What's the deal?
     
  24. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Humanoid characters use muscle strengths between -1 and +1 to bend legs, arms, etc. If you consider the leg and knee joint, you can bend the leg from straight up and down (+1) to leg bent up behind body with heel kicking into the bum (-1). The default value of 0 is therefore the leg bend halfway back. This is then true for all joints - the default weird looking chicken-dance pose is values of 0 for all muscles, not a T-pose. A T-pose can be done, but it would be +1 for the knee joint to get the leg straight, etc.

    So that funny hunch basically means all the muscle strengths are zero (the default). You have not specified a value in the animation clip to override the default value for that muscle. It you apply a T-pose set of muscle values, it will work on all humanoid characters no matter what bone names, because the T-pose is humanoid (muscle) based.
     
  25. Sam-N

    Sam-N

    Joined:
    Mar 4, 2015
    Posts:
    6
    Thanks, I appreciate the reply!

    That's what I was assuming with the muscles, as it looks the same as in the "Muscles & Settings" view. How do I "apply" a T-pose set of muscle values? The animation I've made has no parameters, so why wouldn't it just inherit the default pose of the FBX?

    Also note that this doesn't happen with an Avatar I made from the 3ds Max Biped model, it looks fine:
    upload_2022-3-29_3-1-49.png

    Thanks again!
     
  26. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    The inheritance rules depend on the context you are using the animation clip in I think. I personally am only using animation clips in Timeline objects. In that context, it never looks back at the FBX file. Everything defaults to zero, then using override tracks and animation masks I can control different parts of the character (e.g. overlay a walk animation clip with a wave animation clip with masks to limit the wave to the upper body (so the legs keep walking).

    To expand a bit more, if I create an animation track for a humanoid character, all the muscles will be set to zero. I *must* use animation clips or key frames etc to override the values if I want anything other than zero.

    Where to find a T-pose for animation rigging? Ummm. I have slowly collected sets of free animation clips I can find, such as from mixamo.com. So I found a clip from somewhere, then just use it. But I don't recall where I got it from sorry.

    With animation controllers (what is normally used in games - all the state machine stuff) things are different. It has its own layering stuff (I read up on it, but don't use it). But I have never heard of it "defaulting" to an animation clip stored in the FBX file. You have to tell it to use that clip I think.
     
  27. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Is there a fix for this yet... as soon as i add an empty clip and enter animation mode and the character pops to this position !?

    Using latest official release 2021.3f1

    upload_2022-4-23_16-54-53.png
     
  28. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    That is not a “bug”. That position is the value zero for all muscles and root transform in a humanoid character. Animation clips don’t add to the current pose, they override it, so you effectively told it “don’t use the current pose - use when I tell you to do instead, and set anything I don’t tell you to zero”.
     
  29. amiel_ace

    amiel_ace

    Joined:
    Oct 25, 2014
    Posts:
    18
    Every aspect of unity has an annoying bug, this is one of them.
    So frustrating unity. what a piece of crap software.
     
  30. brunordeangelis

    brunordeangelis

    Joined:
    Jul 30, 2020
    Posts:
    4
    Spent hours looking for a fix for this... I get it thanks to @akent99 but it's a very unintuitive and annoying workflow.
     
    akent99 likes this.
  31. Deleted User

    Deleted User

    Guest

    I thought everything set at zero was supposed to be a T pose?
     
  32. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    No, not for humanoid "muscles". For example, the lower leg goes from weights of straight down (+1) to straight up behind the body (-1), so 0 is the lower leg pointing out straight (horizontal) backwards. If straight down was 0 (as needed for a T-pose) then +1 would be the leg at the knee joint kicking yourself in the stomach - a physical impossibility ... for normal humans anyway. Humanoid muscles decided to use -1 to +1 for the range of muscles mimicking what humans can do with joints. (I don't know why they did not just use 0 to +1 for example.)
     
  33. korsynx

    korsynx

    Joined:
    Jan 2, 2021
    Posts:
    11
    I am still having this issue in unity 2023. As soon as I click on the timeline to edit my character, the t-pose switches to the animation falling pose, so I cant see where the character really is to animate it.. help??