I just found my new least favorite feature of Unity! I’m sure second and third place won’t mind since they’re likely animation related as well. The intended workflow is unintuitive, buried, and unexplained. I would never have found it or known it existed if not for this post.
Here’s my best summary of what I learned today. I’m not an animator, so if this isn’t quite right feel free to correct it.
Additive is presented explicitly as an interaction between animation layers, yet it appears to sabotage itself before it gets a chance to apply that totally normal behavior. Rest assured, it will add correctly… but only after you manually assign a reference pose within the context of the layer (unless you happen to like the weird default?). I personally expected the default to just be zeroes for everything, because that would make sense and allow me to proceed without the extra step. That’s not the case. There is a zero involved, but not the one you’re hoping for.
The default reference pose is the first frame of each animation clip (time = zero). If, like me, your animation clip doesn’t begin with or pass through a base pose, or if it’s a single frame state relying on transitions to blend, this default unusable. You could restructure your whole set of animation clips, or you could assign a pose manually.
Your custom reference pose should instead be a single frame animation clip capturing the values your clips relate to. If you’re like me, you might include every layer that gets touched and set them all to zero. Unity makes no effort to explain how this process is handled, or even that it should be handled. Keep in mind that this pose is relative to the current layer only, so you don’t necessarily need to pack it with an entire T-pose or all of your settings across the entire animator, though it might be easier.
The advantage of the custom reference pose is that you only need to maintain it once across all animations in the layer and you can change it later on to increment default values while preserving the offsets in the animation clips. I assume the default pose must be maintained across every layer. I’m sure there are plenty of animation styles where that behavior is fine and dandy, but we wouldn’t be here if we were using them.
To assign the reference pose, you need to select all animation clips used in the layer and set the inspector to Debug mode. Unity made a dumb dumb and buried core features where you’ll never ever find them and didn’t leave so much as a ransom note to let you know where to dig. Assign the pose to Additive Reference Pose Clip, then enable the Has Additive Reference Pose toggle. Now your animations will use the values contained in the custom reference pose to finalize the layer’s internal values.
When it comes to actually adding between layers, as the original workflow implies, the principles appear to be what you’d expect. The internal value (animation value - reference value) is added to the external value, which is derived from whatever layers are beneath the additive one. If none of those layers touch the same property, I assume you’ll have the same problem you face with override layers when a property is only sometimes assigned.
** Slight differences for imported animation clips versus standalone files. Looks to require copying to standalone clips.
** Not sure how an empty animation state behaves since it lacks a clip to assign poses to.
Things Unity should go ahead and fix several years ago:
- Expose the additive reference pose settings. Relate them clearly to one another.
- Improve the tooltips for the additive blend mode and point users to the relevant animation clip values.
- Allow a layer-wide default reference pose to be assigned in the same panel as the AvatarMask.
- Add a toggle that switches between using first frames and zero values as the default for a layer.
- Provide a solution for imported animation clips.