Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Motion Time on Additive Layer is causing cumulative blending with each update.

Discussion in 'Animation' started by Ben_at_Work, Mar 23, 2022.

  1. Ben_at_Work

    Ben_at_Work

    Joined:
    Mar 16, 2022
    Posts:
    91
    I'm new to Unity's animation system, so I was hoping to follow a few intuitive workflows to get a set of animations I'd made working right. I have one layer for a blink animation, another to add an emotion, and a third for the movement cycle. I don't yet have a proper control scheme set up to test them as the rig is intended to be driven by a separate script.

    The emotion layer is driven through the Motion Time parameter option with a float, and that value should be normalized to the time of the animation itself. 0 should be unhappy, 0.5 is neutral, and 1 is happy. Pretty simple. When that layer is set to override, it works fine. I need it to be additive, however, which bafflingly adds each state of the animation on top of each other. Every time I touch the float value, it adds that frame onto the already combined rig, making the character happier and happier and happier... until it curls back on itself in a broken mess of rig. It's unworkable and nonsensical.

    What am I doing wrong?

    The entire layer consists of a default state driven by a Motion Time float. That's all. The float is set to 0.0, and no matter what I set, the animation only moves forward infinitely, never back.
     
  2. Ben_at_Work

    Ben_at_Work

    Joined:
    Mar 16, 2022
    Posts:
    91
    I guess Unity doesn't maintain or enforce any sort of base pose in its animation layers, and even though it forces the topmost layer to have full weight, it strangely doesn't force it to be an override layer. Without at least one override layer, the "base" pose is updated to equal the current pose, adding over and over with seemingly no memory where it began.

    So now I'm wondering why Unity doesn't detect and warn against that, or even provide a backup default (zero out all the joints) when none is provided. I was trying to test my animation layers in isolation, and by happenstance was getting it right only because I hadn't yet changed them to additive when I tested.