Chapter 9. Animating the Character
In this chapter, we will cover the following recipes:
- Linking the character and making a proxy
- Creating a simple walk cycle for the character by assigning keys to the bones
- Tweaking the actions in Graph Editor
- Using the Non Linear Action Editor to mix different actions
Introduction
There are literally a plethora of tutorials and manuals about animation principles in general, and in Blender in particular, on the Web and in bookstores, so this one is going to be just a very easy chapter, mainly about the technical aspects of creating a simple animation with the rigged Gidiosaurus character, following the most usual pipeline commonly used in Blender (at least for the open movies).
Linking the character and making a proxy
The habit of linking assets from library files is the most useful and used, I would say, not only in a Blender based workflow, but also in the industry. A linked asset, in our case a creature character, can be placed and animated even if not already completed in all its parts, thus it allows a team to work almost at the same time on the different aspects. In our case, the Gidiosaurus is still missing texturing and shaders, but can already be placed on stage and animated anyway.
To link an asset in Blender and keep the possibility of animating it through a rig, we must make a proxy of the rig itself. A proxy object overrides the animation controls of a linked object in a non-destructive way, so that an animator can animate it locally to the .blend
file the rigged character has been linked to. This way, the linked character object retains all its original information and is only locally altered by the proxy object scene.
Getting ready
As the first thing, we must prepare the library, so open the Gidiosaurus_final_detailing.blend
file:
- Go to the Outliner and select the Gidiosaurus_lowres mesh, then also Shift-select the Armor, the Armor_decorations, the rivets, the Eyes, and the Corneas objects.
- Press Ctrl + G, and all the selected objects are outlined in green to show that now they belong to a group, in this case, to the same group we created just now.
- Go to the Object window and in the Groups subpanel, change the generic default Group name to Gidiosaurus.
- Go to the Outliner and click on the eye icon to the side of the rig item to make it visible again, and then click on the rig item itself to select it.
- Press Ctrl + Tab to go out of Pose Mode and go to the Groups subpanel under the Object window again. Click on the Add to Group button and in the pop-up menu, select the Gidiosaurus item (in this case, the only group already created). The rig is outlined in green as well:
- Click again on the Restrict view-port visibility button (the one with the eye icon) to the side of the rig item to hide it and save the file as
Gidiosaurus_library.blend
.
How to do it…
- Click on the File item in the main menu bar, select the New item, and confirm by clicking on the Reload Start-Up File pop-up (or just press Ctrl + N).
- Select the default Cube and delete it, then go to File | Link (or press Ctrl + Alt + O). Browse and click on the
Gidiosaurus_library.blend
file, then click on the Group folder item, and finally click on the Gidiosaurus item. Click on the Link from Library button to the top right of the screen.A new object has appeared at the 3D Cursor location (that should be placed at the center of the scene), and what we have got at this point is the linked Gidiosaurus group; this means that the character and any other object inside the Gidiosaurus group in the library file are now linked and instanced on an Empty that is named Gidiosaurus as well:
Remember that in the library file, inside the Gidiosaurus group we put also the rig, which for the moment is not visible in the linked group because it is hidden in the library file.
- Press Ctrl + Alt + P, and a new pop-up appears where we can select the item we want to proxify (although all the objects inside the group appear in the list, at the moment only an Armature can be proxified). Click on the rig item:
The rig appears as a separate object in the Outliner, identified by the name Gidiosaurus_proxy; at this point, it is possible to only select the rig (which is still in Object Mode) and move it to a different layer.
- Select the Gidiosaurus_proxy object and move it to the 11th scene layer (use the M key). Shift-click to enable the layer and then go to the Display subpanel, under the Object Data window, to enable the X-Ray item.
- Press Ctrl + Tab to go into Pose Mode and the N key to call the viewport Properties sidepanel.
- Save the file as
Gidiosaurus_proxy.blend
.At this point, looking at the viewport Properties sidepanel, we will see the Rig Layers interface usually created by the Rigify addon, but if we save the file and reopen it, the interface is gone.
This is because, at least for the moment, the Python script that draws the rig interface doesn't get automatically linked with the rig, so it's something we must do by hand. This is not a big issue, and by the way, the procedure is incredibly simple:
- Click again on File | Link in the main header menu (or press Ctrl + Alt + O).
- Browse to the
Gidiosaurus_library.blend
file, click on it, and then click on the Text item. Click on the rig_ui.py item (the Python script for the interface) and then on the Link from Library button. - Save the file and reopen it; the rig interface is visible again on the viewport Properties sidebar:
Getting ready
As the first thing, we must prepare the library, so open the Gidiosaurus_final_detailing.blend
file:
- Go to the Outliner and select the Gidiosaurus_lowres mesh, then also Shift-select the Armor, the Armor_decorations, the rivets, the Eyes, and the Corneas objects.
- Press Ctrl + G, and all the selected objects are outlined in green to show that now they belong to a group, in this case, to the same group we created just now.
- Go to the Object window and in the Groups subpanel, change the generic default Group name to Gidiosaurus.
- Go to the Outliner and click on the eye icon to the side of the rig item to make it visible again, and then click on the rig item itself to select it.
- Press Ctrl + Tab to go out of Pose Mode and go to the Groups subpanel under the Object window again. Click on the Add to Group button and in the pop-up menu, select the Gidiosaurus item (in this case, the only group already created). The rig is outlined in green as well:
- Click again on the Restrict view-port visibility button (the one with the eye icon) to the side of the rig item to hide it and save the file as
Gidiosaurus_library.blend
.
How to do it…
- Click on the File item in the main menu bar, select the New item, and confirm by clicking on the Reload Start-Up File pop-up (or just press Ctrl + N).
- Select the default Cube and delete it, then go to File | Link (or press Ctrl + Alt + O). Browse and click on the
Gidiosaurus_library.blend
file, then click on the Group folder item, and finally click on the Gidiosaurus item. Click on the Link from Library button to the top right of the screen.A new object has appeared at the 3D Cursor location (that should be placed at the center of the scene), and what we have got at this point is the linked Gidiosaurus group; this means that the character and any other object inside the Gidiosaurus group in the library file are now linked and instanced on an Empty that is named Gidiosaurus as well:
Remember that in the library file, inside the Gidiosaurus group we put also the rig, which for the moment is not visible in the linked group because it is hidden in the library file.
- Press Ctrl + Alt + P, and a new pop-up appears where we can select the item we want to proxify (although all the objects inside the group appear in the list, at the moment only an Armature can be proxified). Click on the rig item:
The rig appears as a separate object in the Outliner, identified by the name Gidiosaurus_proxy; at this point, it is possible to only select the rig (which is still in Object Mode) and move it to a different layer.
- Select the Gidiosaurus_proxy object and move it to the 11th scene layer (use the M key). Shift-click to enable the layer and then go to the Display subpanel, under the Object Data window, to enable the X-Ray item.
- Press Ctrl + Tab to go into Pose Mode and the N key to call the viewport Properties sidepanel.
- Save the file as
Gidiosaurus_proxy.blend
.At this point, looking at the viewport Properties sidepanel, we will see the Rig Layers interface usually created by the Rigify addon, but if we save the file and reopen it, the interface is gone.
This is because, at least for the moment, the Python script that draws the rig interface doesn't get automatically linked with the rig, so it's something we must do by hand. This is not a big issue, and by the way, the procedure is incredibly simple:
- Click again on File | Link in the main header menu (or press Ctrl + Alt + O).
- Browse to the
Gidiosaurus_library.blend
file, click on it, and then click on the Text item. Click on the rig_ui.py item (the Python script for the interface) and then on the Link from Library button. - Save the file and reopen it; the rig interface is visible again on the viewport Properties sidebar:
How to do it…
- Click on the File item in the main menu bar, select the New item, and confirm by clicking on the Reload Start-Up File pop-up (or just press Ctrl + N).
- Select the default Cube and delete it, then go to File | Link (or press Ctrl + Alt + O). Browse and click on the
Gidiosaurus_library.blend
file, then click on the Group folder item, and finally click on the Gidiosaurus item. Click on the Link from Library button to the top right of the screen.A new object has appeared at the 3D Cursor location (that should be placed at the center of the scene), and what we have got at this point is the linked Gidiosaurus group; this means that the character and any other object inside the Gidiosaurus group in the library file are now linked and instanced on an Empty that is named Gidiosaurus as well:
Remember that in the library file, inside the Gidiosaurus group we put also the rig, which for the moment is not visible in the linked group because it is hidden in the library file.
- Press Ctrl + Alt + P, and a new pop-up appears where we can select the item we want to proxify (although all the objects inside the group appear in the list, at the moment only an Armature can be proxified). Click on the rig item:
The rig appears as a separate object in the Outliner, identified by the name Gidiosaurus_proxy; at this point, it is possible to only select the rig (which is still in Object Mode) and move it to a different layer.
- Select the Gidiosaurus_proxy object and move it to the 11th scene layer (use the M key). Shift-click to enable the layer and then go to the Display subpanel, under the Object Data window, to enable the X-Ray item.
- Press Ctrl + Tab to go into Pose Mode and the N key to call the viewport Properties sidepanel.
- Save the file as
Gidiosaurus_proxy.blend
.At this point, looking at the viewport Properties sidepanel, we will see the Rig Layers interface usually created by the Rigify addon, but if we save the file and reopen it, the interface is gone.
This is because, at least for the moment, the Python script that draws the rig interface doesn't get automatically linked with the rig, so it's something we must do by hand. This is not a big issue, and by the way, the procedure is incredibly simple:
- Click again on File | Link in the main header menu (or press Ctrl + Alt + O).
- Browse to the
Gidiosaurus_library.blend
file, click on it, and then click on the Text item. Click on the rig_ui.py item (the Python script for the interface) and then on the Link from Library button. - Save the file and reopen it; the rig interface is visible again on the viewport Properties sidebar:
Creating a simple walk cycle for the character by assigning keys to the bones
We are now going to create a simple walk cycle for the Gidiosaurus character by assigning position and rotation (and in some cases, also scaling) keys to the control bones of the rig.
Getting ready
In Blender, there is already a preset screen layout named Animation that you can switch to and start animating. By the way, I usually prefer to set up my screen layout for the required task, and animating is no exception, so let's first prepare the scene and the screen for the job:
- Open the
Gidiosaurus_proxy.blend
file. - If necessary, enable the 3D manipulator widget in the toolbar of the 3D view (press Ctrl + Spacebar), click on the Translate icon button, and set Transform Orientation to (just for the moment) Global.
- Split the 3D view horizontally into two windows and change the bottom one into a Dope Sheet window. Click on the Editing context being displayed button on its toolbar to switch from Dope Sheet to the Action Editor context Mode.
- Go to the Properties sidepanel of the 3D viewport (use the N key to make it appear if necessary) and under the Rig Layers subpanel, disable the Arm.L (FK), Arm.R (FK), Leg.L (FK), and Leg.R (FK) buttons.
- Select the Gidiosaurus_proxy rig, making sure you're in Pose Mode, and select the hand.ik.L control bone. Go to the Rig Main Properties subpanel under the Properties panel and set the FK / IK (hand.ik.L) slider to 1.000:
- Repeat for the hand.ik.R bone and for the foot.ik.L and foot.ik.R control bones as well.
- Go to the Scene window, enable the Simplify subpanel, and set the Subdivision level to 0 (or, if you have a more powerful machine than my laptop, also to 1).
- Go into the Side view and press the 5 key on the numpad to go into the Ortho view.
- Click on the red button icon (Automatic keyframe insertion for Objects and Bones) in the Timeline toolbar.
- Save the file as
Gidiosaurus_walkcycle.blend
.
How to do it…
To create a walk cycle, it's important to first establish the start and the end poses of the walk, so let's pose our character for his first step:
- Be sure to be in the first frame (which in Blender is frame 1 and not 0), both by clicking on the Jump to first/last frame in frame range left button on the Timeline toolbar or by pressing the Shift + Left Arrow keys.
- Select the foot_ik.R control bone and, by using the widget, move it backward on the global y axis to around 0.350.
As you release the mouse button, an Action datablock, automatically named Gidiosaurus_proxyAction, is created and a keyframe for the foot_ik.R bone is automatically added in the first frame in the Action Editor window. We can also see the value for the movement on the y axis in the Transform subpanel.
Note that all the transformation value slots turned yellow; this is to show that at the current frame, an animation keyframe exists for all those values:
- Temporarily, switch 3D View to the Graph Editor window:
As you can see, because we enabled the red button icon (Automatic keyframe insertion for Objects and Bones) in the Timeline toolbar, every time we move, rotate, or scale a bone, a keyframe for Location, Rotation, and Scaling is automatically added to the Action. This can be handy, but also results in a lot of useless keyframes, for example, for most of the rig bones, we need to set keys for the Location and/or the Rotation, but very rarely for the Scaling.
- Put the mouse cursor inside the Curve Editor area of the Graph Editor and press the A key to deselect everything.
- Shift + left-click on the Scale and Quaternion Rotation items in the Gidiosaurus_proxy Channel Region to select them, then press X to delete them:
- Switch back to the 3D View, and in the Transform subpanel in the Properties sidebar (and in the Transform subpanel under the Bone window in the main Properties panel), now only the Location slots are highlighted in yellow.
- Disable the red button icon (Automatic keyframe insertion for Objects and Bones) in the Timeline toolbar.
- Go to frame 21 by grabbing and moving the Time Cursor inside the Timeline window or the Action Editor window, or by typing the frame number inside the Current Frame button on the Timeline toolbar.
- Select the foot_ik.R control bone and by using the widget, move it forward on the global y axis for around -0.440.
- Press I and in the Insert Keyframe Menu, select the Location item; this adds a second key to the foot_ik.R bone at frame 21, but this time only for Location:
- Go to frame 41, right-click to select the key at frame 1 in the Action Editor window, and press Shift + D to duplicate it, then move the duplicated key to frame 41.
- Put the mouse cursor in the Timeline and press the E key to set the total length of the animation to the current frame position:
- Still at frame 41 (but this being a cycle, frame 1 could also be fine) and with the foot_ik.R bone selected, click on the Copy the current pose of the selected bone to copy/paste buffer button on the 3D viewport toolbar.
- Go to frame 21 and select the foot_ik.L bone, then click on the Paste the stored pose on to the current pose button at the extreme right side of the 3D viewport toolbar to paste a mirrored pose.
- Press the I key and in the pop-up menu, click on the Location item to add a new key:
- Now, still at frame 21, select the foot_ik.R bone and click on the Copy the current pose of the selected bone to copy/paste buffer button on the 3D viewport toolbar.
- Go to frame 1, select the foot_ik.L bone, and again click on the Paste the stored pose on to the current pose button to paste the reversed pose, then press I and insert a Location key.
- Select and duplicate the new key at frame 1 for the foot_ik.L bone and move the duplicated one to frame 41:
At this point, by scrolling the Time Cursor in the Timeline, in the Action Editor window, or by clicking on the Play Animation button in the Player Control on the Timeline toolbar, we can already see a complete shuffling cycle of the movement of the feet of the Gidiosaurus:
- Now go to frame 1, select the torso bone, and lower it on the z axis for almost -0.200, then assign a position key.
- Select the just added torso bone key in the Action Editor window, press Shift + D to duplicate it, and move the duplicate to frame 21, then repeat for frame 41:
- Go to frame 11, select the foot_ik.R bone, and move it on the z axis for 0.200, then assign a position key.
- As we already did at steps 16 and 17, copy the bone pose, go to frame 31, and paste it reversed, then assign a position key to the foot_ik.L bone.
- Working in the same manner, select the hand_ik.R and .L bones and animate them according to the Gidiosaurus' walk (note: as for any average walk cycle, in the opposite position with respect to the feet):
- Reselect the torso bone, go to frame 1, and move it forward for 0.240 on the y axis. Assign a new position key (to overwrite the old one), then delete the keys at frames 21 and 41 and substitute them with duplicates of the new frame 1 key.
- Go to frame 11 and move the torso bone for almost 0.200 upward on the z axis. Duplicate the key for frame 31.
- Go to frame 1 and select the toe.R bone, then assign a rotation key. Go to frame 11 and rotate the bone on the normal x axis (the red circle in the widget tool with Transform Orientation set to Normal) for 75°. Go to frame 21 and press Alt + R to clear the rotation pose and assign a rotation key. Use Shift + D to duplicate the last added key and move the duplicated one to frame 41.
- Select the toe.L bone and assign a rotation key at frame 1, then go to frame 21 and repeat. Copy the toe.R pose at frame 11 and paste it reversed for the toe.L bone at frame 31, then assign a cleared rotation pose key at frame 41:
- Following the previous procedures, set keys for the position and/or the rotation of all the affected bones, also adding movements such as the rotation of the torso and of the hips, the position of the pole target for legs and arms, the swinging of the head to compensate for the body's lateral movements, the closed mouth and the open eyelids, and so on:
The animation cycle, at this point, looks really stiff and robotic. This is simply because everything happens at the same time, that is, in the same frame, as you can easily see in the Action Editor window (to enlarge a window, put the mouse cursor inside it and press Ctrl + Up Arrow; to go back, press Ctrl + Down Arrow):
To make the animation look more realistic and natural, we must offset some of the keys to make the different actions happen at different times; for example, the torso bone goes down a few frames later than the foot touching the ground, and goes up a few frames later as well, the same for the head swinging, and so on.
- To offset the affected keys, simply select and/or Shift-select and move them for the required frames, forward or backward in the Action Editor window. Here, a bit of testing is needed to reach the right number of frames (usually in the range of 3-5 frames, by the way).
- Where a hole happens at frame 1 in the action channel for a bone because of the dislocation of the keys, simply duplicate the last right side key of that bone and move it to the appropriate negative frame position. That is, to the left side of frame 0, and be sure that the relative item, Allow Negative Frames, is enabled in the Editing tab of the User Preferences panel, as you can see in the following screenshot for the torso and for the elbow_target_ik bones:
- Rename the action
Gidiosaurus_Walkcycle
. To better check the playing animation, go to the Timeline toolbar to set the end frame for the total length of the animation to 40 frames, because frame 1 and frame 41 are the same poses. - Save the file.
At this point, we have made our first action with the Gidiosaurus character, and it's a 41 frame-long walk cycle meant to be repeated in loops for longer animations.
Because in the next recipe we are going to use the Non Linear Action Editor (NLA Editor) to re-use the action datablocks to build the final animation, we need now to create some more actions to be mixed with the walk cycle one.
- Activate the Fake User for the Gidiosaurus_Walkcycle action by clicking on the F icon button to the side of the action datablock on the Action Editor toolbar, then click on the X icon button to unlink the action datablock.
- Put the mouse cursor in the 3D viewport and press the A key to select all the control bones, then press Alt + G, Alt + R, and Alt + S to clear any position, rotation, or scale and restore the rig default pose (actually, the only control bones using the scale operator for the animation are the fingers, which we haven't animated so far).
- Be sure to be at frame 1 and zoom to the character's head, select the head.001 and neck bones, and assign a rotation key, then select the ctrl_mouth bone and assign a position key.
- Rename the action
Gidiosaurus_Roar
, then enable the Fake User; use Shift + D to duplicate the keys and move the duplicated ones to frame 21. - Go to frame 15 and rotate the head.001 and neck bones clockwise to raise the head, then open the mouth wide by moving the ctrl_mouth bone down.
- Go to frame 7 and rotate the head.001 and neck bones counterclockwise a bit to lower the head:
We have now built a roar action for the Gidiosaurus, but it happens in only 21 frames, so it's really too fast. Although it is possible to scale any action strip in the NLA Editor window, in this case it's better to do it directly in the basic action itself.
- In the Action Editor window, put the Time Cursor to frame 1, then press the A key to select all the keys of the action. Press S | X | 2 | Enter to scale the action of the double to frame 41:
- Now that the action length has been doubled, we can move some keys of a few frames and also animate the movement of the character's tongue a bit during the roar:
- Again, click on the X icon button to unlink the action datablock, select all the bones, then press Alt + G and Alt + R to clear the poses.
- Shift-select the thumb.R and .L, f_index.L and .R, and f_middle.L, and .R control bones and add a Scaling key. Rename the newly created action
Gidiosaurus_Fingers
and enable the Fake User: - Now Shift-select for both the .L and .R bones, thumb.01, thumb.02, and thumb.03, f_index.01 and f_index.02, f_middle.01 and f_middle.02, and the palm control bones, then add a Rotation key:
- Now that we have all the finger bones' names in the Action Editor list-tree to the left (the Channel Region), start to click on the bone names to highlight them, for example, click on the thumb.L item, then press Shift + PageUp keys to move it to the top of the list.
- Then highlight the thumb.01.L bone and by pressing the PageUp arrow, move it right after the thumb.L bone (press Shift + PageUp to eventually go directly to the top). Repeat with the thumb.02.L and the thumb.03.L bones, then go to the thumb.R bone, and so on. To move an item downward in the list-tree, simply press the PageDown key instead (or Shift + PageDown to go directly to the bottom).
- Repeat the ordering until you have grouped the bones' names by finger in the list-tree, to make it easier to individuate them in the Action Editor window, then use Shift + D to duplicate all the keys and move the duplicated ones to frame 41.
- Go to frame 21, select thumb.L, .R, f_index.L, .R, f_middle.L, and .R bones and press S to scale them to 0.900. Assign a Scaling key, then select and rotate the other control bones, and assign Rotation keys (be aware that the previous scaling bones can also be rotated). Also, by using the Copy/Paste technique already shown, build a kind of creepy hands animation:
- When you are done, thanks to the re-ordering we made in the Channel Region, go to the Action Editor window and move groups of keys based on their finger group; in short, to avoid the everything-at-the-same-time issue, dislocate the timing of one finger with respect to the others:
- After this, click on the Display number of users of this data button to create a new copy of the action and change the name to Gidiosaurus_Fingers.L. In the Channel Region, Shift-select all the .R bones items and delete them (X key), then enable the Fake User.
- Click on the double arrows icon to the left side of the datablock name (Browse Action to be linked) and reselect the Gidiosaurus_Fingers action.
- Again, click on the Display number of users of this data button to create a new copy of the action and change the name to Gidiosaurus_Fingers.R. Shift-select all the .L bones items and delete them. Enable the Fake User and click on the X icon button to unlink the action datablock.
- Save the file.
To have a look at the completed walk cycle of the Gidiosaurus and the other actions, open the Gidiosaurus_walkcycle_final.blend
file provided with this cookbook.
How it works…
An Action is a bones F-Curves datablock created at the same moment any animation key is added through the Insert Keyframe Menu (I key) or the red button icon (Automatic keyframe insertion for Objects and Bones) in the Timeline toolbar. The newly created Action automatically takes the name from the object itself (Gidiosaurus_proxy in this case) plus the Action suffix.
The Actions are stored inside the .blend
file, but thanks to the Fake User they don't necessarily need to be linked to the rig to be preserved after saving and closing the file.
Note that the scaling operation for the selected keys of an Action in the Action Editor window (and the same for the Graph Editor and the NLA Editor) use the Time Cursor position as the pivot point. Also note that even though we did it in our recipe, it wasn't mandatory in this case to declare the x (horizontal) axis for the scaling.
There's more…
Organizing the bones' names in the list inside an action in the Action Editor window is a good way to quickly find the required item, but it can be improved even further by Bone Groups:
- Open the
Gidiosaurus_library.blend
file and go to the Outliner; click on the eye icon to the side of the rig item to unhide it. - Select the rig and go to the Object Data window, then in the Bone Groups subpanel, click on the + icon to add a bone group.
- Double click on it to rename it thumbs, then go into the 3D viewport and Shift-select all the thumbs' bones.
- Click on the Assign button, then click on the Color slot to choose a Theme Color Set from the pop-up menu:
- Repeat the steps from 2 to 4 for the other two fingers, thus creating the indexes and middles bone groups and selecting a different Theme Color Set option for each group:
- In the Outliner, hide the rig item again and save the file.
- Re-open the
Gidiosaurus_walkcycle.blend
file; the colored bones don't show in the proxified rig, and this is because we had already proxified it and only later assigned the bone groups to the library file. - The solution to fix this is simply to select the affected bones one at a time and by going to the Relations subpanel under the Bone window, click on the Bone Group empty field to select the name of the appropriate group:
By the way, it is always better to do the Bone Groups before the proxy, if possible.
The colors of the Bone Groups also show as background color for the bone channels inside the Action Editor window, making it a lot easier to select all the bones of a group; just be sure to have the Show Group Colors item enabled in the View menu on the Action Editor toolbar:
You can find the library with the colored fingers' control bones under the alternative file named Gidiosaurus_library_colors.blend
.
See also
The walk cycle and the other actions we built in this recipe are, from an animation point of view, very simple and basic, not meant to teach you how to animate but only to show enough of Blender's tools for you to easily start animating a rigged character.
If you want to go deeper into the animation process, in Blender or not, here are some links to visit:
Getting ready
In Blender, there is already a preset screen layout named Animation that you can switch to and start animating. By the way, I usually prefer to set up my screen layout for the required task, and animating is no exception, so let's first prepare the scene and the screen for the job:
- Open the
Gidiosaurus_proxy.blend
file. - If necessary, enable the 3D manipulator widget in the toolbar of the 3D view (press Ctrl + Spacebar), click on the Translate icon button, and set Transform Orientation to (just for the moment) Global.
- Split the 3D view horizontally into two windows and change the bottom one into a Dope Sheet window. Click on the Editing context being displayed button on its toolbar to switch from Dope Sheet to the Action Editor context Mode.
- Go to the Properties sidepanel of the 3D viewport (use the N key to make it appear if necessary) and under the Rig Layers subpanel, disable the Arm.L (FK), Arm.R (FK), Leg.L (FK), and Leg.R (FK) buttons.
- Select the Gidiosaurus_proxy rig, making sure you're in Pose Mode, and select the hand.ik.L control bone. Go to the Rig Main Properties subpanel under the Properties panel and set the FK / IK (hand.ik.L) slider to 1.000:
- Repeat for the hand.ik.R bone and for the foot.ik.L and foot.ik.R control bones as well.
- Go to the Scene window, enable the Simplify subpanel, and set the Subdivision level to 0 (or, if you have a more powerful machine than my laptop, also to 1).
- Go into the Side view and press the 5 key on the numpad to go into the Ortho view.
- Click on the red button icon (Automatic keyframe insertion for Objects and Bones) in the Timeline toolbar.
- Save the file as
Gidiosaurus_walkcycle.blend
.
How to do it…
To create a walk cycle, it's important to first establish the start and the end poses of the walk, so let's pose our character for his first step:
- Be sure to be in the first frame (which in Blender is frame 1 and not 0), both by clicking on the Jump to first/last frame in frame range left button on the Timeline toolbar or by pressing the Shift + Left Arrow keys.
- Select the foot_ik.R control bone and, by using the widget, move it backward on the global y axis to around 0.350.
As you release the mouse button, an Action datablock, automatically named Gidiosaurus_proxyAction, is created and a keyframe for the foot_ik.R bone is automatically added in the first frame in the Action Editor window. We can also see the value for the movement on the y axis in the Transform subpanel.
Note that all the transformation value slots turned yellow; this is to show that at the current frame, an animation keyframe exists for all those values:
- Temporarily, switch 3D View to the Graph Editor window:
As you can see, because we enabled the red button icon (Automatic keyframe insertion for Objects and Bones) in the Timeline toolbar, every time we move, rotate, or scale a bone, a keyframe for Location, Rotation, and Scaling is automatically added to the Action. This can be handy, but also results in a lot of useless keyframes, for example, for most of the rig bones, we need to set keys for the Location and/or the Rotation, but very rarely for the Scaling.
- Put the mouse cursor inside the Curve Editor area of the Graph Editor and press the A key to deselect everything.
- Shift + left-click on the Scale and Quaternion Rotation items in the Gidiosaurus_proxy Channel Region to select them, then press X to delete them:
- Switch back to the 3D View, and in the Transform subpanel in the Properties sidebar (and in the Transform subpanel under the Bone window in the main Properties panel), now only the Location slots are highlighted in yellow.
- Disable the red button icon (Automatic keyframe insertion for Objects and Bones) in the Timeline toolbar.
- Go to frame 21 by grabbing and moving the Time Cursor inside the Timeline window or the Action Editor window, or by typing the frame number inside the Current Frame button on the Timeline toolbar.
- Select the foot_ik.R control bone and by using the widget, move it forward on the global y axis for around -0.440.
- Press I and in the Insert Keyframe Menu, select the Location item; this adds a second key to the foot_ik.R bone at frame 21, but this time only for Location:
- Go to frame 41, right-click to select the key at frame 1 in the Action Editor window, and press Shift + D to duplicate it, then move the duplicated key to frame 41.
- Put the mouse cursor in the Timeline and press the E key to set the total length of the animation to the current frame position:
- Still at frame 41 (but this being a cycle, frame 1 could also be fine) and with the foot_ik.R bone selected, click on the Copy the current pose of the selected bone to copy/paste buffer button on the 3D viewport toolbar.
- Go to frame 21 and select the foot_ik.L bone, then click on the Paste the stored pose on to the current pose button at the extreme right side of the 3D viewport toolbar to paste a mirrored pose.
- Press the I key and in the pop-up menu, click on the Location item to add a new key:
- Now, still at frame 21, select the foot_ik.R bone and click on the Copy the current pose of the selected bone to copy/paste buffer button on the 3D viewport toolbar.
- Go to frame 1, select the foot_ik.L bone, and again click on the Paste the stored pose on to the current pose button to paste the reversed pose, then press I and insert a Location key.
- Select and duplicate the new key at frame 1 for the foot_ik.L bone and move the duplicated one to frame 41:
At this point, by scrolling the Time Cursor in the Timeline, in the Action Editor window, or by clicking on the Play Animation button in the Player Control on the Timeline toolbar, we can already see a complete shuffling cycle of the movement of the feet of the Gidiosaurus:
- Now go to frame 1, select the torso bone, and lower it on the z axis for almost -0.200, then assign a position key.
- Select the just added torso bone key in the Action Editor window, press Shift + D to duplicate it, and move the duplicate to frame 21, then repeat for frame 41:
- Go to frame 11, select the foot_ik.R bone, and move it on the z axis for 0.200, then assign a position key.
- As we already did at steps 16 and 17, copy the bone pose, go to frame 31, and paste it reversed, then assign a position key to the foot_ik.L bone.
- Working in the same manner, select the hand_ik.R and .L bones and animate them according to the Gidiosaurus' walk (note: as for any average walk cycle, in the opposite position with respect to the feet):
- Reselect the torso bone, go to frame 1, and move it forward for 0.240 on the y axis. Assign a new position key (to overwrite the old one), then delete the keys at frames 21 and 41 and substitute them with duplicates of the new frame 1 key.
- Go to frame 11 and move the torso bone for almost 0.200 upward on the z axis. Duplicate the key for frame 31.
- Go to frame 1 and select the toe.R bone, then assign a rotation key. Go to frame 11 and rotate the bone on the normal x axis (the red circle in the widget tool with Transform Orientation set to Normal) for 75°. Go to frame 21 and press Alt + R to clear the rotation pose and assign a rotation key. Use Shift + D to duplicate the last added key and move the duplicated one to frame 41.
- Select the toe.L bone and assign a rotation key at frame 1, then go to frame 21 and repeat. Copy the toe.R pose at frame 11 and paste it reversed for the toe.L bone at frame 31, then assign a cleared rotation pose key at frame 41:
- Following the previous procedures, set keys for the position and/or the rotation of all the affected bones, also adding movements such as the rotation of the torso and of the hips, the position of the pole target for legs and arms, the swinging of the head to compensate for the body's lateral movements, the closed mouth and the open eyelids, and so on:
The animation cycle, at this point, looks really stiff and robotic. This is simply because everything happens at the same time, that is, in the same frame, as you can easily see in the Action Editor window (to enlarge a window, put the mouse cursor inside it and press Ctrl + Up Arrow; to go back, press Ctrl + Down Arrow):
To make the animation look more realistic and natural, we must offset some of the keys to make the different actions happen at different times; for example, the torso bone goes down a few frames later than the foot touching the ground, and goes up a few frames later as well, the same for the head swinging, and so on.
- To offset the affected keys, simply select and/or Shift-select and move them for the required frames, forward or backward in the Action Editor window. Here, a bit of testing is needed to reach the right number of frames (usually in the range of 3-5 frames, by the way).
- Where a hole happens at frame 1 in the action channel for a bone because of the dislocation of the keys, simply duplicate the last right side key of that bone and move it to the appropriate negative frame position. That is, to the left side of frame 0, and be sure that the relative item, Allow Negative Frames, is enabled in the Editing tab of the User Preferences panel, as you can see in the following screenshot for the torso and for the elbow_target_ik bones:
- Rename the action
Gidiosaurus_Walkcycle
. To better check the playing animation, go to the Timeline toolbar to set the end frame for the total length of the animation to 40 frames, because frame 1 and frame 41 are the same poses. - Save the file.
At this point, we have made our first action with the Gidiosaurus character, and it's a 41 frame-long walk cycle meant to be repeated in loops for longer animations.
Because in the next recipe we are going to use the Non Linear Action Editor (NLA Editor) to re-use the action datablocks to build the final animation, we need now to create some more actions to be mixed with the walk cycle one.
- Activate the Fake User for the Gidiosaurus_Walkcycle action by clicking on the F icon button to the side of the action datablock on the Action Editor toolbar, then click on the X icon button to unlink the action datablock.
- Put the mouse cursor in the 3D viewport and press the A key to select all the control bones, then press Alt + G, Alt + R, and Alt + S to clear any position, rotation, or scale and restore the rig default pose (actually, the only control bones using the scale operator for the animation are the fingers, which we haven't animated so far).
- Be sure to be at frame 1 and zoom to the character's head, select the head.001 and neck bones, and assign a rotation key, then select the ctrl_mouth bone and assign a position key.
- Rename the action
Gidiosaurus_Roar
, then enable the Fake User; use Shift + D to duplicate the keys and move the duplicated ones to frame 21. - Go to frame 15 and rotate the head.001 and neck bones clockwise to raise the head, then open the mouth wide by moving the ctrl_mouth bone down.
- Go to frame 7 and rotate the head.001 and neck bones counterclockwise a bit to lower the head:
We have now built a roar action for the Gidiosaurus, but it happens in only 21 frames, so it's really too fast. Although it is possible to scale any action strip in the NLA Editor window, in this case it's better to do it directly in the basic action itself.
- In the Action Editor window, put the Time Cursor to frame 1, then press the A key to select all the keys of the action. Press S | X | 2 | Enter to scale the action of the double to frame 41:
- Now that the action length has been doubled, we can move some keys of a few frames and also animate the movement of the character's tongue a bit during the roar:
- Again, click on the X icon button to unlink the action datablock, select all the bones, then press Alt + G and Alt + R to clear the poses.
- Shift-select the thumb.R and .L, f_index.L and .R, and f_middle.L, and .R control bones and add a Scaling key. Rename the newly created action
Gidiosaurus_Fingers
and enable the Fake User: - Now Shift-select for both the .L and .R bones, thumb.01, thumb.02, and thumb.03, f_index.01 and f_index.02, f_middle.01 and f_middle.02, and the palm control bones, then add a Rotation key:
- Now that we have all the finger bones' names in the Action Editor list-tree to the left (the Channel Region), start to click on the bone names to highlight them, for example, click on the thumb.L item, then press Shift + PageUp keys to move it to the top of the list.
- Then highlight the thumb.01.L bone and by pressing the PageUp arrow, move it right after the thumb.L bone (press Shift + PageUp to eventually go directly to the top). Repeat with the thumb.02.L and the thumb.03.L bones, then go to the thumb.R bone, and so on. To move an item downward in the list-tree, simply press the PageDown key instead (or Shift + PageDown to go directly to the bottom).
- Repeat the ordering until you have grouped the bones' names by finger in the list-tree, to make it easier to individuate them in the Action Editor window, then use Shift + D to duplicate all the keys and move the duplicated ones to frame 41.
- Go to frame 21, select thumb.L, .R, f_index.L, .R, f_middle.L, and .R bones and press S to scale them to 0.900. Assign a Scaling key, then select and rotate the other control bones, and assign Rotation keys (be aware that the previous scaling bones can also be rotated). Also, by using the Copy/Paste technique already shown, build a kind of creepy hands animation:
- When you are done, thanks to the re-ordering we made in the Channel Region, go to the Action Editor window and move groups of keys based on their finger group; in short, to avoid the everything-at-the-same-time issue, dislocate the timing of one finger with respect to the others:
- After this, click on the Display number of users of this data button to create a new copy of the action and change the name to Gidiosaurus_Fingers.L. In the Channel Region, Shift-select all the .R bones items and delete them (X key), then enable the Fake User.
- Click on the double arrows icon to the left side of the datablock name (Browse Action to be linked) and reselect the Gidiosaurus_Fingers action.
- Again, click on the Display number of users of this data button to create a new copy of the action and change the name to Gidiosaurus_Fingers.R. Shift-select all the .L bones items and delete them. Enable the Fake User and click on the X icon button to unlink the action datablock.
- Save the file.
To have a look at the completed walk cycle of the Gidiosaurus and the other actions, open the Gidiosaurus_walkcycle_final.blend
file provided with this cookbook.
How it works…
An Action is a bones F-Curves datablock created at the same moment any animation key is added through the Insert Keyframe Menu (I key) or the red button icon (Automatic keyframe insertion for Objects and Bones) in the Timeline toolbar. The newly created Action automatically takes the name from the object itself (Gidiosaurus_proxy in this case) plus the Action suffix.
The Actions are stored inside the .blend
file, but thanks to the Fake User they don't necessarily need to be linked to the rig to be preserved after saving and closing the file.
Note that the scaling operation for the selected keys of an Action in the Action Editor window (and the same for the Graph Editor and the NLA Editor) use the Time Cursor position as the pivot point. Also note that even though we did it in our recipe, it wasn't mandatory in this case to declare the x (horizontal) axis for the scaling.
There's more…
Organizing the bones' names in the list inside an action in the Action Editor window is a good way to quickly find the required item, but it can be improved even further by Bone Groups:
- Open the
Gidiosaurus_library.blend
file and go to the Outliner; click on the eye icon to the side of the rig item to unhide it. - Select the rig and go to the Object Data window, then in the Bone Groups subpanel, click on the + icon to add a bone group.
- Double click on it to rename it thumbs, then go into the 3D viewport and Shift-select all the thumbs' bones.
- Click on the Assign button, then click on the Color slot to choose a Theme Color Set from the pop-up menu:
- Repeat the steps from 2 to 4 for the other two fingers, thus creating the indexes and middles bone groups and selecting a different Theme Color Set option for each group:
- In the Outliner, hide the rig item again and save the file.
- Re-open the
Gidiosaurus_walkcycle.blend
file; the colored bones don't show in the proxified rig, and this is because we had already proxified it and only later assigned the bone groups to the library file. - The solution to fix this is simply to select the affected bones one at a time and by going to the Relations subpanel under the Bone window, click on the Bone Group empty field to select the name of the appropriate group:
By the way, it is always better to do the Bone Groups before the proxy, if possible.
The colors of the Bone Groups also show as background color for the bone channels inside the Action Editor window, making it a lot easier to select all the bones of a group; just be sure to have the Show Group Colors item enabled in the View menu on the Action Editor toolbar:
You can find the library with the colored fingers' control bones under the alternative file named Gidiosaurus_library_colors.blend
.
See also
The walk cycle and the other actions we built in this recipe are, from an animation point of view, very simple and basic, not meant to teach you how to animate but only to show enough of Blender's tools for you to easily start animating a rigged character.
If you want to go deeper into the animation process, in Blender or not, here are some links to visit:
How to do it…
To create a walk cycle, it's important to first establish the start and the end poses of the walk, so let's pose our character for his first step:
- Be sure to be in the first frame (which in Blender is frame 1 and not 0), both by clicking on the Jump to first/last frame in frame range left button on the Timeline toolbar or by pressing the Shift + Left Arrow keys.
- Select the foot_ik.R control bone and, by using the widget, move it backward on the global y axis to around 0.350.
As you release the mouse button, an Action datablock, automatically named Gidiosaurus_proxyAction, is created and a keyframe for the foot_ik.R bone is automatically added in the first frame in the Action Editor window. We can also see the value for the movement on the y axis in the Transform subpanel.
Note that all the transformation value slots turned yellow; this is to show that at the current frame, an animation keyframe exists for all those values:
- Temporarily, switch 3D View to the Graph Editor window:
As you can see, because we enabled the red button icon (Automatic keyframe insertion for Objects and Bones) in the Timeline toolbar, every time we move, rotate, or scale a bone, a keyframe for Location, Rotation, and Scaling is automatically added to the Action. This can be handy, but also results in a lot of useless keyframes, for example, for most of the rig bones, we need to set keys for the Location and/or the Rotation, but very rarely for the Scaling.
- Put the mouse cursor inside the Curve Editor area of the Graph Editor and press the A key to deselect everything.
- Shift + left-click on the Scale and Quaternion Rotation items in the Gidiosaurus_proxy Channel Region to select them, then press X to delete them:
- Switch back to the 3D View, and in the Transform subpanel in the Properties sidebar (and in the Transform subpanel under the Bone window in the main Properties panel), now only the Location slots are highlighted in yellow.
- Disable the red button icon (Automatic keyframe insertion for Objects and Bones) in the Timeline toolbar.
- Go to frame 21 by grabbing and moving the Time Cursor inside the Timeline window or the Action Editor window, or by typing the frame number inside the Current Frame button on the Timeline toolbar.
- Select the foot_ik.R control bone and by using the widget, move it forward on the global y axis for around -0.440.
- Press I and in the Insert Keyframe Menu, select the Location item; this adds a second key to the foot_ik.R bone at frame 21, but this time only for Location:
- Go to frame 41, right-click to select the key at frame 1 in the Action Editor window, and press Shift + D to duplicate it, then move the duplicated key to frame 41.
- Put the mouse cursor in the Timeline and press the E key to set the total length of the animation to the current frame position:
- Still at frame 41 (but this being a cycle, frame 1 could also be fine) and with the foot_ik.R bone selected, click on the Copy the current pose of the selected bone to copy/paste buffer button on the 3D viewport toolbar.
- Go to frame 21 and select the foot_ik.L bone, then click on the Paste the stored pose on to the current pose button at the extreme right side of the 3D viewport toolbar to paste a mirrored pose.
- Press the I key and in the pop-up menu, click on the Location item to add a new key:
- Now, still at frame 21, select the foot_ik.R bone and click on the Copy the current pose of the selected bone to copy/paste buffer button on the 3D viewport toolbar.
- Go to frame 1, select the foot_ik.L bone, and again click on the Paste the stored pose on to the current pose button to paste the reversed pose, then press I and insert a Location key.
- Select and duplicate the new key at frame 1 for the foot_ik.L bone and move the duplicated one to frame 41:
At this point, by scrolling the Time Cursor in the Timeline, in the Action Editor window, or by clicking on the Play Animation button in the Player Control on the Timeline toolbar, we can already see a complete shuffling cycle of the movement of the feet of the Gidiosaurus:
- Now go to frame 1, select the torso bone, and lower it on the z axis for almost -0.200, then assign a position key.
- Select the just added torso bone key in the Action Editor window, press Shift + D to duplicate it, and move the duplicate to frame 21, then repeat for frame 41:
- Go to frame 11, select the foot_ik.R bone, and move it on the z axis for 0.200, then assign a position key.
- As we already did at steps 16 and 17, copy the bone pose, go to frame 31, and paste it reversed, then assign a position key to the foot_ik.L bone.
- Working in the same manner, select the hand_ik.R and .L bones and animate them according to the Gidiosaurus' walk (note: as for any average walk cycle, in the opposite position with respect to the feet):
- Reselect the torso bone, go to frame 1, and move it forward for 0.240 on the y axis. Assign a new position key (to overwrite the old one), then delete the keys at frames 21 and 41 and substitute them with duplicates of the new frame 1 key.
- Go to frame 11 and move the torso bone for almost 0.200 upward on the z axis. Duplicate the key for frame 31.
- Go to frame 1 and select the toe.R bone, then assign a rotation key. Go to frame 11 and rotate the bone on the normal x axis (the red circle in the widget tool with Transform Orientation set to Normal) for 75°. Go to frame 21 and press Alt + R to clear the rotation pose and assign a rotation key. Use Shift + D to duplicate the last added key and move the duplicated one to frame 41.
- Select the toe.L bone and assign a rotation key at frame 1, then go to frame 21 and repeat. Copy the toe.R pose at frame 11 and paste it reversed for the toe.L bone at frame 31, then assign a cleared rotation pose key at frame 41:
- Following the previous procedures, set keys for the position and/or the rotation of all the affected bones, also adding movements such as the rotation of the torso and of the hips, the position of the pole target for legs and arms, the swinging of the head to compensate for the body's lateral movements, the closed mouth and the open eyelids, and so on:
The animation cycle, at this point, looks really stiff and robotic. This is simply because everything happens at the same time, that is, in the same frame, as you can easily see in the Action Editor window (to enlarge a window, put the mouse cursor inside it and press Ctrl + Up Arrow; to go back, press Ctrl + Down Arrow):
To make the animation look more realistic and natural, we must offset some of the keys to make the different actions happen at different times; for example, the torso bone goes down a few frames later than the foot touching the ground, and goes up a few frames later as well, the same for the head swinging, and so on.
- To offset the affected keys, simply select and/or Shift-select and move them for the required frames, forward or backward in the Action Editor window. Here, a bit of testing is needed to reach the right number of frames (usually in the range of 3-5 frames, by the way).
- Where a hole happens at frame 1 in the action channel for a bone because of the dislocation of the keys, simply duplicate the last right side key of that bone and move it to the appropriate negative frame position. That is, to the left side of frame 0, and be sure that the relative item, Allow Negative Frames, is enabled in the Editing tab of the User Preferences panel, as you can see in the following screenshot for the torso and for the elbow_target_ik bones:
- Rename the action
Gidiosaurus_Walkcycle
. To better check the playing animation, go to the Timeline toolbar to set the end frame for the total length of the animation to 40 frames, because frame 1 and frame 41 are the same poses. - Save the file.
At this point, we have made our first action with the Gidiosaurus character, and it's a 41 frame-long walk cycle meant to be repeated in loops for longer animations.
Because in the next recipe we are going to use the Non Linear Action Editor (NLA Editor) to re-use the action datablocks to build the final animation, we need now to create some more actions to be mixed with the walk cycle one.
- Activate the Fake User for the Gidiosaurus_Walkcycle action by clicking on the F icon button to the side of the action datablock on the Action Editor toolbar, then click on the X icon button to unlink the action datablock.
- Put the mouse cursor in the 3D viewport and press the A key to select all the control bones, then press Alt + G, Alt + R, and Alt + S to clear any position, rotation, or scale and restore the rig default pose (actually, the only control bones using the scale operator for the animation are the fingers, which we haven't animated so far).
- Be sure to be at frame 1 and zoom to the character's head, select the head.001 and neck bones, and assign a rotation key, then select the ctrl_mouth bone and assign a position key.
- Rename the action
Gidiosaurus_Roar
, then enable the Fake User; use Shift + D to duplicate the keys and move the duplicated ones to frame 21. - Go to frame 15 and rotate the head.001 and neck bones clockwise to raise the head, then open the mouth wide by moving the ctrl_mouth bone down.
- Go to frame 7 and rotate the head.001 and neck bones counterclockwise a bit to lower the head:
We have now built a roar action for the Gidiosaurus, but it happens in only 21 frames, so it's really too fast. Although it is possible to scale any action strip in the NLA Editor window, in this case it's better to do it directly in the basic action itself.
- In the Action Editor window, put the Time Cursor to frame 1, then press the A key to select all the keys of the action. Press S | X | 2 | Enter to scale the action of the double to frame 41:
- Now that the action length has been doubled, we can move some keys of a few frames and also animate the movement of the character's tongue a bit during the roar:
- Again, click on the X icon button to unlink the action datablock, select all the bones, then press Alt + G and Alt + R to clear the poses.
- Shift-select the thumb.R and .L, f_index.L and .R, and f_middle.L, and .R control bones and add a Scaling key. Rename the newly created action
Gidiosaurus_Fingers
and enable the Fake User: - Now Shift-select for both the .L and .R bones, thumb.01, thumb.02, and thumb.03, f_index.01 and f_index.02, f_middle.01 and f_middle.02, and the palm control bones, then add a Rotation key:
- Now that we have all the finger bones' names in the Action Editor list-tree to the left (the Channel Region), start to click on the bone names to highlight them, for example, click on the thumb.L item, then press Shift + PageUp keys to move it to the top of the list.
- Then highlight the thumb.01.L bone and by pressing the PageUp arrow, move it right after the thumb.L bone (press Shift + PageUp to eventually go directly to the top). Repeat with the thumb.02.L and the thumb.03.L bones, then go to the thumb.R bone, and so on. To move an item downward in the list-tree, simply press the PageDown key instead (or Shift + PageDown to go directly to the bottom).
- Repeat the ordering until you have grouped the bones' names by finger in the list-tree, to make it easier to individuate them in the Action Editor window, then use Shift + D to duplicate all the keys and move the duplicated ones to frame 41.
- Go to frame 21, select thumb.L, .R, f_index.L, .R, f_middle.L, and .R bones and press S to scale them to 0.900. Assign a Scaling key, then select and rotate the other control bones, and assign Rotation keys (be aware that the previous scaling bones can also be rotated). Also, by using the Copy/Paste technique already shown, build a kind of creepy hands animation:
- When you are done, thanks to the re-ordering we made in the Channel Region, go to the Action Editor window and move groups of keys based on their finger group; in short, to avoid the everything-at-the-same-time issue, dislocate the timing of one finger with respect to the others:
- After this, click on the Display number of users of this data button to create a new copy of the action and change the name to Gidiosaurus_Fingers.L. In the Channel Region, Shift-select all the .R bones items and delete them (X key), then enable the Fake User.
- Click on the double arrows icon to the left side of the datablock name (Browse Action to be linked) and reselect the Gidiosaurus_Fingers action.
- Again, click on the Display number of users of this data button to create a new copy of the action and change the name to Gidiosaurus_Fingers.R. Shift-select all the .L bones items and delete them. Enable the Fake User and click on the X icon button to unlink the action datablock.
- Save the file.
To have a look at the completed walk cycle of the Gidiosaurus and the other actions, open the Gidiosaurus_walkcycle_final.blend
file provided with this cookbook.
How it works…
An Action is a bones F-Curves datablock created at the same moment any animation key is added through the Insert Keyframe Menu (I key) or the red button icon (Automatic keyframe insertion for Objects and Bones) in the Timeline toolbar. The newly created Action automatically takes the name from the object itself (Gidiosaurus_proxy in this case) plus the Action suffix.
The Actions are stored inside the .blend
file, but thanks to the Fake User they don't necessarily need to be linked to the rig to be preserved after saving and closing the file.
Note that the scaling operation for the selected keys of an Action in the Action Editor window (and the same for the Graph Editor and the NLA Editor) use the Time Cursor position as the pivot point. Also note that even though we did it in our recipe, it wasn't mandatory in this case to declare the x (horizontal) axis for the scaling.
There's more…
Organizing the bones' names in the list inside an action in the Action Editor window is a good way to quickly find the required item, but it can be improved even further by Bone Groups:
- Open the
Gidiosaurus_library.blend
file and go to the Outliner; click on the eye icon to the side of the rig item to unhide it. - Select the rig and go to the Object Data window, then in the Bone Groups subpanel, click on the + icon to add a bone group.
- Double click on it to rename it thumbs, then go into the 3D viewport and Shift-select all the thumbs' bones.
- Click on the Assign button, then click on the Color slot to choose a Theme Color Set from the pop-up menu:
- Repeat the steps from 2 to 4 for the other two fingers, thus creating the indexes and middles bone groups and selecting a different Theme Color Set option for each group:
- In the Outliner, hide the rig item again and save the file.
- Re-open the
Gidiosaurus_walkcycle.blend
file; the colored bones don't show in the proxified rig, and this is because we had already proxified it and only later assigned the bone groups to the library file. - The solution to fix this is simply to select the affected bones one at a time and by going to the Relations subpanel under the Bone window, click on the Bone Group empty field to select the name of the appropriate group:
By the way, it is always better to do the Bone Groups before the proxy, if possible.
The colors of the Bone Groups also show as background color for the bone channels inside the Action Editor window, making it a lot easier to select all the bones of a group; just be sure to have the Show Group Colors item enabled in the View menu on the Action Editor toolbar:
You can find the library with the colored fingers' control bones under the alternative file named Gidiosaurus_library_colors.blend
.
See also
The walk cycle and the other actions we built in this recipe are, from an animation point of view, very simple and basic, not meant to teach you how to animate but only to show enough of Blender's tools for you to easily start animating a rigged character.
If you want to go deeper into the animation process, in Blender or not, here are some links to visit:
How it works…
An Action is a bones F-Curves datablock created at the same moment any animation key is added through the Insert Keyframe Menu (I key) or the red button icon (Automatic keyframe insertion for Objects and Bones) in the Timeline toolbar. The newly created Action automatically takes the name from the object itself (Gidiosaurus_proxy in this case) plus the Action suffix.
The Actions are stored inside the .blend
file, but thanks to the Fake User they don't necessarily need to be linked to the rig to be preserved after saving and closing the file.
Note that the scaling operation for the selected keys of an Action in the Action Editor window (and the same for the Graph Editor and the NLA Editor) use the Time Cursor position as the pivot point. Also note that even though we did it in our recipe, it wasn't mandatory in this case to declare the x (horizontal) axis for the scaling.
There's more…
Organizing the bones' names in the list inside an action in the Action Editor window is a good way to quickly find the required item, but it can be improved even further by Bone Groups:
- Open the
Gidiosaurus_library.blend
file and go to the Outliner; click on the eye icon to the side of the rig item to unhide it. - Select the rig and go to the Object Data window, then in the Bone Groups subpanel, click on the + icon to add a bone group.
- Double click on it to rename it thumbs, then go into the 3D viewport and Shift-select all the thumbs' bones.
- Click on the Assign button, then click on the Color slot to choose a Theme Color Set from the pop-up menu:
- Repeat the steps from 2 to 4 for the other two fingers, thus creating the indexes and middles bone groups and selecting a different Theme Color Set option for each group:
- In the Outliner, hide the rig item again and save the file.
- Re-open the
Gidiosaurus_walkcycle.blend
file; the colored bones don't show in the proxified rig, and this is because we had already proxified it and only later assigned the bone groups to the library file. - The solution to fix this is simply to select the affected bones one at a time and by going to the Relations subpanel under the Bone window, click on the Bone Group empty field to select the name of the appropriate group:
By the way, it is always better to do the Bone Groups before the proxy, if possible.
The colors of the Bone Groups also show as background color for the bone channels inside the Action Editor window, making it a lot easier to select all the bones of a group; just be sure to have the Show Group Colors item enabled in the View menu on the Action Editor toolbar:
You can find the library with the colored fingers' control bones under the alternative file named Gidiosaurus_library_colors.blend
.
See also
The walk cycle and the other actions we built in this recipe are, from an animation point of view, very simple and basic, not meant to teach you how to animate but only to show enough of Blender's tools for you to easily start animating a rigged character.
If you want to go deeper into the animation process, in Blender or not, here are some links to visit:
There's more…
Organizing the bones' names in the list inside an action in the Action Editor window is a good way to quickly find the required item, but it can be improved even further by Bone Groups:
- Open the
Gidiosaurus_library.blend
file and go to the Outliner; click on the eye icon to the side of the rig item to unhide it. - Select the rig and go to the Object Data window, then in the Bone Groups subpanel, click on the + icon to add a bone group.
- Double click on it to rename it thumbs, then go into the 3D viewport and Shift-select all the thumbs' bones.
- Click on the Assign button, then click on the Color slot to choose a Theme Color Set from the pop-up menu:
- Repeat the steps from 2 to 4 for the other two fingers, thus creating the indexes and middles bone groups and selecting a different Theme Color Set option for each group:
- In the Outliner, hide the rig item again and save the file.
- Re-open the
Gidiosaurus_walkcycle.blend
file; the colored bones don't show in the proxified rig, and this is because we had already proxified it and only later assigned the bone groups to the library file. - The solution to fix this is simply to select the affected bones one at a time and by going to the Relations subpanel under the Bone window, click on the Bone Group empty field to select the name of the appropriate group:
By the way, it is always better to do the Bone Groups before the proxy, if possible.
The colors of the Bone Groups also show as background color for the bone channels inside the Action Editor window, making it a lot easier to select all the bones of a group; just be sure to have the Show Group Colors item enabled in the View menu on the Action Editor toolbar:
You can find the library with the colored fingers' control bones under the alternative file named Gidiosaurus_library_colors.blend
.
See also
The walk cycle and the other actions we built in this recipe are, from an animation point of view, very simple and basic, not meant to teach you how to animate but only to show enough of Blender's tools for you to easily start animating a rigged character.
If you want to go deeper into the animation process, in Blender or not, here are some links to visit:
See also
The walk cycle and the other actions we built in this recipe are, from an animation point of view, very simple and basic, not meant to teach you how to animate but only to show enough of Blender's tools for you to easily start animating a rigged character.
If you want to go deeper into the animation process, in Blender or not, here are some links to visit:
Tweaking the actions in Graph Editor
In the previous recipe, we built Actions by setting position, rotation, and/or scaling keys, which Blender interpolates through F-Curves to create the character's animation. In this recipe, we are going to see the Graph Editor window, a tool to modify these F-Curves to fix errors or fine-tune the movements of the animated character.
Getting ready
Open the Gidiosaurus_walkcycle.blend
file.
- If it's not already loaded, in the Action Editor window, load the Gidiosaurus_walkcycle action.
- Go to the top main window header and click on the two little arrows to the left side of the button labeled as Default. In the pop-up menu, select the Animation item to change the screen layout:
- Press the Ctrl key and left-click on the top right corner of the Dope Sheet window, then drag the mouse towards the Graph Editor window below to switch the two windows.
- Go to the 3D viewport and zoom to the character to select the foot_ik.L bone; the F-Curves for the selected bone appear in the Graph Editor window:
- Expand the foot_ik.L item in the Graph Editor list-tree by clicking on the little arrow to the side of the item itself, then click on the View item in the toolbar and select the View All item to better visualize the curves inside the Curve Editor area:
- Hide (by clicking on the eye icon) and/or delete (select using left-click and the X key) the unnecessary curve items such as (at least in this case) X Scale, Y Scale, Z Scale or ikfk_switch (foot_ik.L), and so on. Join the unnecessary windows together and adjust the size of the Edit Area (the part with the keyframes) in the Dope Sheet to make them more easily readable. Optionally, enable the Normalize item in the Graph Editor toolbar to show all the F-Curves in a normalized -1 to 1 range.
- Save the file as
Gidiosaurus_F-Curves.blend
:
How to do it…
By selecting a curve name item and/or hiding the others in the Graph Editor list-tree, we can concentrate on one curve at a time. For example, what if we want to change the position of the right foot at frame 27 on the global x axis, when it's high off the ground?
- Just left-click on the X Location (foot_ik.L) item in the list to highlight it and/or simply hide the others. Right-click on the curve keyframe/control point at frame 27 to reveal the handles, then press G | Y to move the keyframe handles on the vertical axis and see the foot move accordingly in the viewport on the global x axis:
- Or else, right-click only on one of the handles of the keyframe to move it and change the curve's envelope:
- By Shift-selecting two or more keyframes of an F-Curve and pressing the T key, it is possible to set the interpolation type through the Set Keyframe Interpolation pop-up menu; by default the F-Curves are Bezier, but they can be switched to Linear or Constant. There are also Easing and pre-made Dynamic effects:
- Finally, the handles' type can also be set through the Set Keyframe Handle Type menu by pressing the V key; by default the handles are Aligned, but they can be set as Free, Vector, Automatic, and Auto Clamped too:
Getting ready
Open the Gidiosaurus_walkcycle.blend
file.
- If it's not already loaded, in the Action Editor window, load the Gidiosaurus_walkcycle action.
- Go to the top main window header and click on the two little arrows to the left side of the button labeled as Default. In the pop-up menu, select the Animation item to change the screen layout:
- Press the Ctrl key and left-click on the top right corner of the Dope Sheet window, then drag the mouse towards the Graph Editor window below to switch the two windows.
- Go to the 3D viewport and zoom to the character to select the foot_ik.L bone; the F-Curves for the selected bone appear in the Graph Editor window:
- Expand the foot_ik.L item in the Graph Editor list-tree by clicking on the little arrow to the side of the item itself, then click on the View item in the toolbar and select the View All item to better visualize the curves inside the Curve Editor area:
- Hide (by clicking on the eye icon) and/or delete (select using left-click and the X key) the unnecessary curve items such as (at least in this case) X Scale, Y Scale, Z Scale or ikfk_switch (foot_ik.L), and so on. Join the unnecessary windows together and adjust the size of the Edit Area (the part with the keyframes) in the Dope Sheet to make them more easily readable. Optionally, enable the Normalize item in the Graph Editor toolbar to show all the F-Curves in a normalized -1 to 1 range.
- Save the file as
Gidiosaurus_F-Curves.blend
:
How to do it…
By selecting a curve name item and/or hiding the others in the Graph Editor list-tree, we can concentrate on one curve at a time. For example, what if we want to change the position of the right foot at frame 27 on the global x axis, when it's high off the ground?
- Just left-click on the X Location (foot_ik.L) item in the list to highlight it and/or simply hide the others. Right-click on the curve keyframe/control point at frame 27 to reveal the handles, then press G | Y to move the keyframe handles on the vertical axis and see the foot move accordingly in the viewport on the global x axis:
- Or else, right-click only on one of the handles of the keyframe to move it and change the curve's envelope:
- By Shift-selecting two or more keyframes of an F-Curve and pressing the T key, it is possible to set the interpolation type through the Set Keyframe Interpolation pop-up menu; by default the F-Curves are Bezier, but they can be switched to Linear or Constant. There are also Easing and pre-made Dynamic effects:
- Finally, the handles' type can also be set through the Set Keyframe Handle Type menu by pressing the V key; by default the handles are Aligned, but they can be set as Free, Vector, Automatic, and Auto Clamped too:
How to do it…
By selecting a curve name item and/or hiding the others in the Graph Editor list-tree, we can concentrate on one curve at a time. For example, what if we want to change the position of the right foot at frame 27 on the global x axis, when it's high off the ground?
- Just left-click on the X Location (foot_ik.L) item in the list to highlight it and/or simply hide the others. Right-click on the curve keyframe/control point at frame 27 to reveal the handles, then press G | Y to move the keyframe handles on the vertical axis and see the foot move accordingly in the viewport on the global x axis:
- Or else, right-click only on one of the handles of the keyframe to move it and change the curve's envelope:
- By Shift-selecting two or more keyframes of an F-Curve and pressing the T key, it is possible to set the interpolation type through the Set Keyframe Interpolation pop-up menu; by default the F-Curves are Bezier, but they can be switched to Linear or Constant. There are also Easing and pre-made Dynamic effects:
- Finally, the handles' type can also be set through the Set Keyframe Handle Type menu by pressing the V key; by default the handles are Aligned, but they can be set as Free, Vector, Automatic, and Auto Clamped too:
Using the Non Linear Action Editor to mix different actions
It's finally time to use the NLA Editor to compose a longer animation using the actions we built in the previous recipes.
Getting ready
As usual, first let's prepare the screen:
- Start Blender and press Ctrl + Alt + U to call the User Preferences panel; in the Editing tab, enable the Allow Negative Frames item.
- Click on the Save User Settings button and close the panel.
- Load the
Gidiosaurus_F-Curves.blend
file and switch the Graph Editor to the NLA Editor window, and the Dope Sheet below it with the Action Editor window. - If necessary, click on the X icon button in the Action Editor window toolbar to unlink any action from the rig and clear the pose:
How to do it…
We are going to add Action strips to the Gidiosaurus_proxy rig, so it's mandatory to have at least one bone selected (any one, but in this case, it's the ctrl_mouth bone):
- Put the mouse cursor in the Track Region (NLA-stack) of the NLA Editor window, right under where it shows Gidiosaurus_proxy | <No Action> items, and press Shift + A to add a NlaTrack channel:
Now, take a moment and load the Gidiosaurus_walkcycle action in the bottom Action Editor window to see the action extension; it starts at frame -15 and ends at frame 45.
- Unlink the action in the Action Editor and move the Time Cursor to negative frame -15; put the mouse cursor in the Strip Edit area to the right side of the NlaTrack item and again press Shift + A. From the pop-up menu, select the Gidiosaurus_Walkcycle item:
A yellow action strip, with the Gidiosaurus_Walkcycle name superimposed, is added to the track at the Time Cursor location (the vertical green bar showing the frame number. If you now press the Play button in the Player Control on the Timeline toolbar, the animation starts at frame 1 and because the animation is only 40 frames long, it loops correctly, exactly as if the action was loaded in the Action Editor window.
- If not already present, press the N key to call the Properties sidepanel of the NLA Editor window, right-click on the action strip to select it, and then go to the Action Clip subpanel. Under Playback Settings, set the Repeat value to 3.000.
- Click on the End button in the Timeline toolbar and change the frame value from 40 to 120 (40 frames x 3):
If you press the Play button now, the animation is repeated 3 times but it doesn't loop correctly anymore because the negative frames keys are also included, in both the second and third repetitions. This is because we loaded the action at frame -15, so this is the Start Frame value for Action Extents (Start Frame = -15, End Frame = 45).
Hence, some adjustment must be done to the action strip:
- First, move the Time Cursor to frame 1; with the strip selected, press the Tab key to go into Edit Mode and make the inner keys of the strip visible, both above the strip in the NLA Editor window, and as an Action in the Action Editor window. This way it's simpler to understand what keys are at what frame, and so on.
- Second, go to the Active Strip subpanel and under the Strip Extents item, set the Start Frame value to 1.000.
- Go to the Action Clip subpanel and under the Action Extents item, set Start Frame to 1.000 as well and the End Frame value to 41.000:
- Press Tab to go out of Edit Mode.
Now, the walk cycle animation loops correctly for all the 120 frames, and obviously it is also possible to loop it even more by raising the Repeat value.
So, the correct and fastest procedure would have been, from the start:
- At frame 1, load the action strip in the NLA Editor window.
- In the Properties sidepanel, under the Action Extents item in the Action Clip subpanel, set the Start Frame value to 1.000 and the End Frame value to 41.000.
- Under Playback Settings, set the Repeat value to 3.000 and the total length of the animation to 120 frames in the End button of the Timeline toolbar:
Now, let's see how to add the other actions:
- Put the mouse cursor under the NlaTrack item and press Shift + A to add a new track (NlaTrack.001); load the Gidiosaurus_Roar action strip and move it (G key) to start at frame 10.
- Select the Gidiosaurus_Walkcycle strip and in the Active Strip subpanel, disable the Auto Blend In/Out item but leave the values as 0.000. Select the Gidiosaurus_Roar strip and disable the Auto Blend In/Out item as well, then set the Blend In value to 10.000 and the Blend Out value to 5.000.
- Add two more tracks, select the NlaTrack.002 track and load the action strip Gidiosaurus_fingers.L, then select the NlaTrack.003 track and load the action strip Gidiosaurus_fingers.R.
- Select the Gidiosaurus_fingers.L strip and in the Active Strip subpanel, disable the Auto Blend In/Out item, and leave the values as 0.000; repeat for the Gidiosaurus_fingers.R strip.
- Move the two strips separately in different positions inside the 120 frames animation range.
- Press the Play button in the Player Control on the Timeline toolbar to watch the composited animation and save the file as
Gidiosaurus_NLA.blend
.
At this point it could be possible to start to render at least some OpenGL preview to see the result, but there are still several steps missing in our workflow before we reach the final goal, from the texturing to the shaders, lighting, and finally beauty-rendering and compositing; all stuff that we'll see in the next few chapters.
Getting ready
As usual, first let's prepare the screen:
- Start Blender and press Ctrl + Alt + U to call the User Preferences panel; in the Editing tab, enable the Allow Negative Frames item.
- Click on the Save User Settings button and close the panel.
- Load the
Gidiosaurus_F-Curves.blend
file and switch the Graph Editor to the NLA Editor window, and the Dope Sheet below it with the Action Editor window. - If necessary, click on the X icon button in the Action Editor window toolbar to unlink any action from the rig and clear the pose:
How to do it…
We are going to add Action strips to the Gidiosaurus_proxy rig, so it's mandatory to have at least one bone selected (any one, but in this case, it's the ctrl_mouth bone):
- Put the mouse cursor in the Track Region (NLA-stack) of the NLA Editor window, right under where it shows Gidiosaurus_proxy | <No Action> items, and press Shift + A to add a NlaTrack channel:
Now, take a moment and load the Gidiosaurus_walkcycle action in the bottom Action Editor window to see the action extension; it starts at frame -15 and ends at frame 45.
- Unlink the action in the Action Editor and move the Time Cursor to negative frame -15; put the mouse cursor in the Strip Edit area to the right side of the NlaTrack item and again press Shift + A. From the pop-up menu, select the Gidiosaurus_Walkcycle item:
A yellow action strip, with the Gidiosaurus_Walkcycle name superimposed, is added to the track at the Time Cursor location (the vertical green bar showing the frame number. If you now press the Play button in the Player Control on the Timeline toolbar, the animation starts at frame 1 and because the animation is only 40 frames long, it loops correctly, exactly as if the action was loaded in the Action Editor window.
- If not already present, press the N key to call the Properties sidepanel of the NLA Editor window, right-click on the action strip to select it, and then go to the Action Clip subpanel. Under Playback Settings, set the Repeat value to 3.000.
- Click on the End button in the Timeline toolbar and change the frame value from 40 to 120 (40 frames x 3):
If you press the Play button now, the animation is repeated 3 times but it doesn't loop correctly anymore because the negative frames keys are also included, in both the second and third repetitions. This is because we loaded the action at frame -15, so this is the Start Frame value for Action Extents (Start Frame = -15, End Frame = 45).
Hence, some adjustment must be done to the action strip:
- First, move the Time Cursor to frame 1; with the strip selected, press the Tab key to go into Edit Mode and make the inner keys of the strip visible, both above the strip in the NLA Editor window, and as an Action in the Action Editor window. This way it's simpler to understand what keys are at what frame, and so on.
- Second, go to the Active Strip subpanel and under the Strip Extents item, set the Start Frame value to 1.000.
- Go to the Action Clip subpanel and under the Action Extents item, set Start Frame to 1.000 as well and the End Frame value to 41.000:
- Press Tab to go out of Edit Mode.
Now, the walk cycle animation loops correctly for all the 120 frames, and obviously it is also possible to loop it even more by raising the Repeat value.
So, the correct and fastest procedure would have been, from the start:
- At frame 1, load the action strip in the NLA Editor window.
- In the Properties sidepanel, under the Action Extents item in the Action Clip subpanel, set the Start Frame value to 1.000 and the End Frame value to 41.000.
- Under Playback Settings, set the Repeat value to 3.000 and the total length of the animation to 120 frames in the End button of the Timeline toolbar:
Now, let's see how to add the other actions:
- Put the mouse cursor under the NlaTrack item and press Shift + A to add a new track (NlaTrack.001); load the Gidiosaurus_Roar action strip and move it (G key) to start at frame 10.
- Select the Gidiosaurus_Walkcycle strip and in the Active Strip subpanel, disable the Auto Blend In/Out item but leave the values as 0.000. Select the Gidiosaurus_Roar strip and disable the Auto Blend In/Out item as well, then set the Blend In value to 10.000 and the Blend Out value to 5.000.
- Add two more tracks, select the NlaTrack.002 track and load the action strip Gidiosaurus_fingers.L, then select the NlaTrack.003 track and load the action strip Gidiosaurus_fingers.R.
- Select the Gidiosaurus_fingers.L strip and in the Active Strip subpanel, disable the Auto Blend In/Out item, and leave the values as 0.000; repeat for the Gidiosaurus_fingers.R strip.
- Move the two strips separately in different positions inside the 120 frames animation range.
- Press the Play button in the Player Control on the Timeline toolbar to watch the composited animation and save the file as
Gidiosaurus_NLA.blend
.
At this point it could be possible to start to render at least some OpenGL preview to see the result, but there are still several steps missing in our workflow before we reach the final goal, from the texturing to the shaders, lighting, and finally beauty-rendering and compositing; all stuff that we'll see in the next few chapters.
How to do it…
We are going to add Action strips to the Gidiosaurus_proxy rig, so it's mandatory to have at least one bone selected (any one, but in this case, it's the ctrl_mouth bone):
- Put the mouse cursor in the Track Region (NLA-stack) of the NLA Editor window, right under where it shows Gidiosaurus_proxy | <No Action> items, and press Shift + A to add a NlaTrack channel:
Now, take a moment and load the Gidiosaurus_walkcycle action in the bottom Action Editor window to see the action extension; it starts at frame -15 and ends at frame 45.
- Unlink the action in the Action Editor and move the Time Cursor to negative frame -15; put the mouse cursor in the Strip Edit area to the right side of the NlaTrack item and again press Shift + A. From the pop-up menu, select the Gidiosaurus_Walkcycle item:
A yellow action strip, with the Gidiosaurus_Walkcycle name superimposed, is added to the track at the Time Cursor location (the vertical green bar showing the frame number. If you now press the Play button in the Player Control on the Timeline toolbar, the animation starts at frame 1 and because the animation is only 40 frames long, it loops correctly, exactly as if the action was loaded in the Action Editor window.
- If not already present, press the N key to call the Properties sidepanel of the NLA Editor window, right-click on the action strip to select it, and then go to the Action Clip subpanel. Under Playback Settings, set the Repeat value to 3.000.
- Click on the End button in the Timeline toolbar and change the frame value from 40 to 120 (40 frames x 3):
If you press the Play button now, the animation is repeated 3 times but it doesn't loop correctly anymore because the negative frames keys are also included, in both the second and third repetitions. This is because we loaded the action at frame -15, so this is the Start Frame value for Action Extents (Start Frame = -15, End Frame = 45).
Hence, some adjustment must be done to the action strip:
- First, move the Time Cursor to frame 1; with the strip selected, press the Tab key to go into Edit Mode and make the inner keys of the strip visible, both above the strip in the NLA Editor window, and as an Action in the Action Editor window. This way it's simpler to understand what keys are at what frame, and so on.
- Second, go to the Active Strip subpanel and under the Strip Extents item, set the Start Frame value to 1.000.
- Go to the Action Clip subpanel and under the Action Extents item, set Start Frame to 1.000 as well and the End Frame value to 41.000:
- Press Tab to go out of Edit Mode.
Now, the walk cycle animation loops correctly for all the 120 frames, and obviously it is also possible to loop it even more by raising the Repeat value.
So, the correct and fastest procedure would have been, from the start:
- At frame 1, load the action strip in the NLA Editor window.
- In the Properties sidepanel, under the Action Extents item in the Action Clip subpanel, set the Start Frame value to 1.000 and the End Frame value to 41.000.
- Under Playback Settings, set the Repeat value to 3.000 and the total length of the animation to 120 frames in the End button of the Timeline toolbar:
Now, let's see how to add the other actions:
- Put the mouse cursor under the NlaTrack item and press Shift + A to add a new track (NlaTrack.001); load the Gidiosaurus_Roar action strip and move it (G key) to start at frame 10.
- Select the Gidiosaurus_Walkcycle strip and in the Active Strip subpanel, disable the Auto Blend In/Out item but leave the values as 0.000. Select the Gidiosaurus_Roar strip and disable the Auto Blend In/Out item as well, then set the Blend In value to 10.000 and the Blend Out value to 5.000.
- Add two more tracks, select the NlaTrack.002 track and load the action strip Gidiosaurus_fingers.L, then select the NlaTrack.003 track and load the action strip Gidiosaurus_fingers.R.
- Select the Gidiosaurus_fingers.L strip and in the Active Strip subpanel, disable the Auto Blend In/Out item, and leave the values as 0.000; repeat for the Gidiosaurus_fingers.R strip.
- Move the two strips separately in different positions inside the 120 frames animation range.
- Press the Play button in the Player Control on the Timeline toolbar to watch the composited animation and save the file as
Gidiosaurus_NLA.blend
.
At this point it could be possible to start to render at least some OpenGL preview to see the result, but there are still several steps missing in our workflow before we reach the final goal, from the texturing to the shaders, lighting, and finally beauty-rendering and compositing; all stuff that we'll see in the next few chapters.