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: Very strange. For reference, these are the components that she has: 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: I'm using Unity 2017.1.0p4 What is happening here?
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.
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.
@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.
reproduced with adam model(free), etthan model(free) , pbr soldier simply added the first keypose transform position when recording, having trouble uploading the clip
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.
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.
Unfortunately, the bug (as reported) is still open - although your issue with the rig sounds like a different problem.
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.
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.
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.
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...)
As of Unity 2020.2.1f, I'm still running into this issue when trying to record animations from a character's animation controller.
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.
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.
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. The weird default pose is the same as the Rig > Configure > Muscles & Settings view. Again, the t-pose is fine, and it appears at the proper position, unlike what's appearing on the Avatar. What's the deal?
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.
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: Thanks again!
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.
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
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”.
Every aspect of unity has an annoying bug, this is one of them. So frustrating unity. what a piece of crap software.
Spent hours looking for a fix for this... I get it thanks to @akent99 but it's a very unintuitive and annoying workflow.
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.)
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??