I have a joint that is animated so that at frame 1, it’s at -30 degrees, frame 2 its at 0 degrees and frame 3 its at +30 degrees.

I am trying to put this animation on top of another animation via additive blend. But it does something weird.

In additive blend I would expect that for frame 0 it would add -30 degrees to the joint, and thus make the joint go back. But thats not what it does.

In additive blend it makes frame 1 be 0 degrees, frame 2 be 30 degrees and frame 3 be 60 degrees.

So in additive mode, it adds no rotation for frame 1, when it should be subtracting 30.

Is this normal behavior? This is not how additive animation has worked in previous engines I have worked with.

It’s like unity is taking the difference between my keyframes, 1 = -30, 2 = 0, 3 = 30, the difference being 60. Then just adding that onto the joint. So then it comes out as 1 =0, 2 = 30, 3 = 60.

I don’t understand how such a thing would even be of usage. If you can only add animations onto the 0 rotation of the joint, but not subtract animations from the 0 position of the joint then you can’t really do much with this… The example in the unity docs of making a character lean left and right wouldn’t even work, the character would only lean twice as much one direction.

Is this a bug, or am I doing something wrong?

There’s a couple of quirks with using additive animations in Unity.

The first frame of the animation is the reference frame; so if frame 1 was the beginning of your animation, that -30 degrees is treated as no movement, so your 0 degrees at frame 2 actually reads as +30 degrees. Basically you have to leave the first frame as your base pose to get the results you expect.

The other thing that’s caught me out is to make sure there’s always a non additive animation playing as well, otherwise the additive transforms will keep adding up and give you odd results.

Hope that helps!

ohh I see

thought it would go off of frame 0 for that

I understand how additive animation works based on your explanation above… it seems that frame 0 is key.

If I import an animation that has 100 frames…
0 : reference
1-33 : intro
34 - 66 : middle
67 - 99 : outro

I know I can use Unity to actually see frames 0 - 33 as the intro, and thus to use frame 0 as the reference frame for additive animation.

HOWEVER, what about if I want to do additive animation with the middle 34 - 66 frames? Will Unity automatically still use frame 0 as the reference frame?? Or will unity actually use frame 34 as the reference frame?

Hrrrm, interesting question, I don’t know! I’d guess it’d use the respective ‘frame zero’ of each split animation, but to know for sure I’d set up a simple scene and do some tests.

Might do one myself when I get home, I’ll post the results if no one beats me to it.

i’ve arranged to do a test tomorrow… unfortunately i dont have maya and can’t set up the test myself, or i would surely post the results to the forum…

i really hope Unity just uses frame 0 of the overall animation… that would seem to make the most sense to me.

if i use Unity Pro to import an animation, and break that animation into 3 separate clips… and i want to do additive blending… i can only properly do it if the first frame of each clip is the reference frame… and that is usually not the case… usually, only the first frame of the animation (and thus the first frame of the first clip) will be correct as the reference frame.

so to answer my own question, the reference frame is the first frame of the particular clip… not the first frame of the overall animation where all the clips came from.

can someone else verify this?

Hi,

I’ve been fighting with additive anims too - to me it looks like the first frame for each defined animation range is always the reference frame (in your case the frame #34 would be the base for the “middle” anim), but this is a very weird design decision. I certainly don’t want to start every additive animation from the base pose!

It also prevents (efficient) use of looping additive animations because you have to skip the base pose frame manually if you don’t want it to be included in your animation. In non-looping animations this is less of an issue because you can just skip the first frame.

In my opinion the frame number zero (or better yet, user-defined keyframe # for each animation range) should always be the “base” where the additive anims are compared to.

br,
Sami