The NLA Editor
We now have two separate actions: "Wave" and "Walkcycle". There's another window in Blender called the NLA Editor (NLA stands for non-linear animation) where we can combine the two actions.
- Change the Buttons window to an NLA Editor window.
This is the NLA Editor. It may not look like much now, but it's quite powerful. Right now there are only two rows. "Armature" refers to the object that has actions (our armature). "Walkcycle" refers to the current action selected in the Action Editor. The diamonds indicate where there is a keyframe on any bone in the walkcycle action.
- In the Action Editor, select the "Wave" action from the dropdown box.
- In the NLA Editor, note how the row under Armature changed, and there are only three diamonds representing the three frames we have keys in the "Wave" action.
Convert an Action to an NLA strip
- Switch back to the "Walkcycle" action by selecting it in the Action Editor menu.
- In the NLA window, select the Walkcycle channel (the line with the diamonds, or keys) with RMB .
- Press C to convert this action into an NLA strip.
By converting the walkcycle into an NLA strip, we've "packaged" the walkcycle into a form that is easily manipulated for longer animations.
- Important: Click the "action" symbol next to the "Armature" row in the NLA Editor. (Also affectionately called the "shark-attack victim" icon). It doesn't look like a button, but it is. It will turn into an icon with strips, indicating that playback will use the NLA Editor and not the Action Editor. It doesn't matter right now with only one action in the NLA Editor, but it will matter later when more actions are added.
- Change the End: frame in the Timeline window to 42. (actually, this should be 41, otherwise you'll see a stutter at each repeat. This is because the action is of length 20, and starts at frame 1: 1 + 2x20 = 41. Really I wonder whose idea it was to number frames from 1.)
- Press AltA in the 3D Window. Note that the character takes two steps and then stops at frame 21 because that's how long the walkcycle is. This is about to change . . .
- In the NLA Editor, press N to bring up the strip properties panel.
Important: Most of the controls for the NLA Editor reside in this panel.
- In the Repeat number box of the strip properties panel, change the number of repeats to 2.
- Now play the animation with AltA in the 3D Window. The character takes 4 steps now, because the walkcycle action of 2 steps was repeated 2 times. However, the walkcycle is very fast because those 4 steps are being taken in only 21 frames. Twice the number of steps in the same amount of frames = twice the speed.
- In the strip properties panel, change Strip End to 42 (*41).
- Play the animation again. Now there are 4 steps (2 repeats), but they are happening over the course of 42 (*40) frames and so are at the same speed as the original action.
By entering numbers in the strip properties panel, you can adjust the speed and number of steps of a walkcycle. You can also adjust the speed by scaling the NLA strip with S.
- Repeat the walkcycle action a total of 5 times.
- Make sure the frame slider is at frame 1.
- Instead of typing in numbers to keep the timing exactly the same (you'd type 105 (*101) into the Strip End number box to get the same speed as the original action), scale the strip with S. Tip: it's easiest if you have the mouse cursor above the range of the strip before scaling, otherwise the scaling directions get reversed. I scaled the strip up to about 120 frames; this will slow down the steps a little bit. Now we have 120 frames of walking! Important: To see all frames of the animation, you have to change the End: frame in the Timeline window to at least the last frame you have keys for, in this case, I would change the End: frame to 120 in the Timeline.
When you use S in the NLA Editor and the Action Editor, the scaling occurs relative to the frame slider. It also matters where the mouse cursor is when you start scaling. If the scaling doesn't act the way you think it should, try again either with the frame slider in a different position, or the mouse cursor in a different position.
Mixing actions in the NLA Editor
- In the Action Editor, select the "Wave" action. Note that once you select it, it appears in the NLA editor along with the three keyframes of the action.
- Convert this action into an NLA strip with C.
- Make the "Wave" action repeat 4 times within the NLA strip using the Repeat number box in the NLA strip Properties panel.
- Lengthen the strip either by scaling or by changing Strip End to something like 50.
- Move the strip later in the animation by selecting it and pressing G to move it. I moved it to around frame 23. This is why the NLA Editor is so powerful: once actions are defined in the Action Editor, you can add them one at a time to the NLA Editor. Once in the NLA Editor, you can move, scale, and mix the actions.
- Press AltA in the 3D Window to view the animation. The wave and the walkcycle happen simultaneously, however, when the hand comes back down, it's a pretty abrupt motion. To fix this:
- With the "Wave" action selected, change the Blendin: and Blendout: number box in the NLA strip properites panel to 8 frames or so. The NLA strip for the "Wave" action changes to reflect this fading in and fading out.
- Play the animation again; the wave should be much smoother.
Changing the stacking order of NLA strips
The order of the strips in the NLA Editor matters. On top is the "Walkcycle" action, and under it is the "Wave" action. Strips on the bottom override strips above them.
In other words, the "Walkcycle" action has keys for all the arm bones. The "Wave" action ALSO has keys for the left arm bones. Since the "Wave" strip is below the "Walkcycle" strip, it overrides any conflicting keys.
To change the stacking order of a selected strip, press CtrlPageUp and CtrlPageDown. Try this:
- Select the "Wave" strip.
- Move it up one row with CtrlPageUp.
- Play the animation.
The wave no longer happens. This is because the "Walkcycle" keys for the left arm bones override the "Wave" keys for the same bones.
- Select the "Wave" strip.
- Move it down one row with CtrlPageDown.
- Play the animation, and the wave should appear again.
We used the NLA Editor to convert the actions we made into NLA strips that can be easily manipulated in the NLA Editor.
Previous: Animating a walkcycle