Any plans for animation layers in Blender ?

I was checking out comparison chart Maya vs Maya LT, and I say that Maya LT is stripped from a lot of animation tools, including animation layers.

Sometime ago I was asking about it here, but in reference to 3DS MAX CAT animation layers, and I recall being told that animation layers aren’t needed and Blender has “awesome” NLA editor.

Well, I suppose if animation layers were useless, Maya wouldn’t have them either and it would be only CAT’s useless features. NLA is not a replacement for animation layers at all. Not even close.

Here is Maya’s video demonstrating animation layers:

Is Gooseberry team planning on implementing something like that? Animation tools haven’t seen much love from developers lately :frowning:

The depsgraph rewrite is being done, that is about animation, so I think we might say that animation is getting some attention even if specific tools are not right now. Cool video.


It’s been on my radar for a while as something that needs to be finished in the NLA system (along with strip time management, and reference values/base curve stuff). Together, these three bugs/todos are some of the biggest pending issues there which, once solved should make this make a lot more useful. Believe it or not, the whole genesis of the NLA design has been orientated around an animation layers workflow - which is why initial versions were in some ways downright hostile to being used for simply reassembling libraries of clips. Solving these last remaining issues should make such a workflow possible.

I had originally planned to try and work on getting this stuff ready for 2.71, but various other work commitments and the impending bcon3 (big) feature freeze means that this will likely have to wait till 2.72. Of course, if nothing urgent crops up this week, I might still get some time to tinker more with this stuff (fingers crossed).


Sounds like a plan!

The only thing I am lost on is how NLA would work in lieu of animation layers?

From what I know working with NLA a bit, it requires Actions which you mix and match. With animation layers, you add secondary animation on top of existing one for the same bones that already have keys. Basically, visually, you add new keys to the same Action that override existing keys for the bones (based on influence), without seeing original keys. Whether for NLA, you’d have to copy Action, tweak animation for specific bones in the frame range, then use original and copied Actions in NLA editor. Which isn’t a bad thing perhaps, but it would be nice not to see any keys for original Action when keying secondary animation (second/third/etc. layers).

Please correct me if I am wrong :slight_smile:

Aligorith, thank you for the continued work - awesome stuff to look forward to!

I am not sue if it’s the same,

but I use multiple animation “tracks” I believe they are called, and then blend them in the bge using the “action actuator”

most of the code you may be able to harvest from that?

No no no.

Basically you keyframe your first layer normally. Then you “push down” (Note: this is the actual name of the functionality attached to the snowflake; I originally intended for that to be a downwards-pointing chevron, but couldn’t find/make a suitable icon at the time) that action onto the NLA stack (i.e. adding it to the set of layers - each layer is represented by a “NLA Track”)

For your secondary motion, you then just start keyframing normally again. Again the keyframes get added to the “Active Action” slot which sits on top of the NLA Stack. When you’re done, you “push down” this action onto the top of the stack.

To go back to an earlier layer, you select the action strip associated with that, and enter “tweaking mode” on that strip. This slides the “active action slot” down to that track, disabling everything after it (so that you’re effectively editing that layer as it was when you keyed it originally). When you’re done, you exit tweaking mode, and the active action slot moves back to its position at the top of the stack, ready for you to go in and add another layer.

The missing part in letting this happen is just the functionality to insert keyframes for new layers without including the effects of lower-down layers.

1 Like

@Aligorith: Kinda hard to understand how it would work :frowning:

I tried replicating what you said manually. I created “main” action, where Cube translates linearly. I only keyed Location. That Action was placed in one track. Then I added another Action, “secondary” where I keyed Rotation only, and placed that into second track. Worked wonderfully as I was able to tweak rotations without seeing location keys of the first Action.

However, as soon as added Location key to “secondary” Action, the “main” Action basically gets ignored and only animation that plays is from “secondary” Action. Messing with extrapolation/blending/influence yields no results. Here is my “setup”:

It would be nice, when implemented, to add any keys to secondary layers without cancelling out keys on the underlying layers (like what Maya/CAT do).

Clearly not the same as animation layers seen in Maya :slight_smile:

Anyone feel like turning this workflow into a tut? :slight_smile:

There are two things to note here:

  1. Currently this doesn’t work that great, since keying the secondary action will take everything that’s already in the stack as well as the extra changes you’ve added on top. The planned features address this issue.
  2. You’ll probably want to set the secondary action to “add” instead of “replace”. This can be done via the “Animation Data” panel there. (On second thought, I may consider making this the default behaviour, but that’d need more testing)

I do mix animation layer in the BGe using the action actuator,

you could probably harvest some of the code from there…

I would love to see Animation layers as seen in Softimage For Maya its a fairly recent development but in Softimage it was tried and tested for years.

I tried - no luck. Maybe it’s a bug?

The action actuator uses a timestep, a layer, and a blend factor, and a priority.

@Aligorith I have some experience using animation layers in Maya, for what it’s worth these are the reasons why I think it works so well. There is a concept of “active” layer ; one does not need to enter tweak mode on a specific action - if it is selected, then any transforms made will be part of the active layer.
Then, it is explicitly stated which objects are part/not part of a layer, thus can or can not be keyed when that layer is active.
Finally, the animation displayed in the viewport is always the result of all enabled layers, which is different from the NLA in that you can choose whether or not to animate the object with or without displaying also the transforms inherited from other layers.

Now I was trying to analyze the differences between Maya’s layers and Blender’s NLA and I encounter the same issue that motorsep reports : my actions do not blend correctly (above one replaces below one, no matter the blending mode).

@@Hadriscus: Do you use 2.7x ? Sounds like a bug report :slight_smile:

Hah ! Wrong. It works fine in both 2.70 and 2.70a (I used this scene as a test).

My confusion comes from a simple misunderstanding : whatever is cooked in the NLA, whichever the strips and the blending modes, if an action stays linked to an object in the action editor, that action will be displayed alone, completely overriding the NLA (as long as it has at least one keyframe on it). One has to unlink the action first so they can see the result of the NLA mixture. Aligorith indeed, the “push down” would deserve a more suited icon so that it can communicate its function better.

All in all, I think this system is actually great.

Also, I was wrong in stating earlier that NLA does not allow one to tweak an action while displaying the result of the NLA stack instead of this action alone. The tweak mode does exactly that.

Damn ! It is brilliantly engineered. Only now do I begin to see the possibilities. I don’t think the current documentation does the NLA editor justice. In fact, I believe Aligorith’s previous post would fit nicely inside the manual.

If I had to suggest something, Aligorith, it is that the NLA editor’s content be entirely ignored when working on a specific action, and this even when this action’s keyed transforms do not override those on below action strips. This behaviour corresponds more or less to Maya’s passthrough mode : it lets the below layers be seen if the top layer does not key the same transforms.
Ah, very difficult to explain. I hope my point is clear enough.

So it works basically like visual keying ?

While it might be a brilliant engineering indeed, it’s not artist friendly :confused: I still don’t get how it all works, and NLA editor is the least documented part of animation capacity of Blender (with least amount of tutorials)

@@Hadriscus: Could you please throw together a small tutorial explaining how would I be able to use NLA to add secondary motion to existing Actions ?

I have several Actions made for my game, which I export a separate animations for my game engine. I’d like to mix. for example running (lower body), and shooting (upper body) anims, and then add secondary motions to upper body so it looks right with legs running animation. And bake out separate action for upper body (shooting main + secondary -> new Action).


Ah, you need to bake several actions into one ? There’s an operator called “bake action” which does exactly this. Of course it will sample the animation curves as well, so you’ll get a key at every frame. At least Maya has a “smart bake” option, but it’s alright if you don’t need to modify the keyframes/curves later on.

I was thinking… quite a few game engines allow animation blending nowadays, can’t you do that in yours ?

Also if you need to animate one action without seeing the others, you can uncheck the visibility of that action in the NLA just as you would do with a transform channel in the graph editor (click the speaker icon) - but I guess you know this.