From BlenderWiki

Jump to: navigation, search

[edit] Creating a walkcycle

Add a new action.
  • Click the small arrows right next to the action name, and choose Add New.
  • Rename the new action "walkcycle" or something similar (can you guess what we're doing next?)
  • Delete all keys with A-A-X. Creating a new action makes a copy of the previously selected action, so these keys are just copies.
  • You can verify that the "Wave" action is still there by selecting it in the dropdown menu in at the bottom of the Action Editor.
Note
Two important notes on Actions:
  • Each Object can have many different Actions, but only one active Action, which is displayed in the Action Editor.
  • This active Action is the one which will receive any new keys you insert, and whose keys you can directly edit.



  • Move the frame slider to frame 1.
  • Clear the location and rotation of all bones in the armature with A-A-Alt R-Alt G. Notice that even though the "Record" button is still pressed, keys were NOT added when we cleared rotation and location. The automatic key insertion does not recognize clearing location or rotation as an actual movement (this is a good thing, but it's important to remember).

[edit] Contact pose

In a walkcycle, the contact pose is the point when the leading leg just touches the ground in front of the character. It's generally the first pose to animate in a walkcycle.

Note
It's impractical for me to take screenshots for each bone movement I make. I'll walk through the first pose (the contact pose), and from then on I'll provide screenshots of front, side, top, and oblique views of each major pose.


  • In the 3D Window, switch to Side view in Ortho mode (NumPad 3 and NumPad 5).
  • Make sure Auto IK is off, otherwise the IK Solvers won't work for the legs.
Move spine1 down in Z.
  • Move spine1 down a little bit in the Z axis to let the legs bend.


Move leg.l up and back.
  • Select leg.l. You may have to move the view to see it before returning to side view. Alternatively, you can select the leg.l channel in the Action Editor to select the bone.
  • Move leg.l back and up.


Rotate leg.l.
  • Rotate leg.l . . .


Rotate toe.l.
  • . . . and rotate toe.l to bend the foot at the toe.


Move and rotate leg.r.
  • Grab and rotate the leg.r bone in front of the body.


  • Now pose the arms. I prefer to turn on Auto IK to get the general shape of the arms, then turn it off as soon as I'm done. You may have to move the view around to get the arms to move and bend in the direction you want. Keep in mind that the legs and arms move opposite: right leg forward means right arm back. Here are front, side, and top views after I posed the arms:
Front.
Side.


Top.
Oblique.


  • Spend some time on the spine: when walking, the leading hand twists the top of the spine toward it, and the trailing arm twists the lower spine toward it. Be aware, though, that by rotating the lower spine bones, the upper spine, neck, and head will rotate as well. So you may have to compensate by rotating the upper spine bones back the opposite way.
  • After rotating the spine, neck and head bones, I had a pose something like the images below. Notice the eyes continue to follow the eyes bone.
Front.
Side.


Top.
Oblique.


[edit] Flipping the pose

  • Select all bones in the armature.
Copy the pose from frame 1 . . .
  • Click the "Copy pose" button at the bottom of the 3D Window. This copies the keys (location, rotation, and scale) for all selected bones that already have keys.
Note
You may have to use  MMB Image:Template-MMB.png to pan the header of the 3D Window back and forth to find these buttons



. . . and paste the flipped pose in frame 11.
  • Move to frame 11 with .
  • In frame 11, click the "Paste flipped pose" button. This pastes the pose in a mirror-image of the pose we just copied, and is a very useful tool!
Note
This is one reason we went through all the trouble of naming the bones "l" and "r". Blender recognizes the bones are on the opposite side of the body and does the calculations to automatically insert the flipped pose for us.


  • Move to frame 21 (remember you can zoom and pan in the Action Editor with MW Image:Template-MW.png and  MMB Image:Template-MMB.png, and advances you by 10 frames).


Paste pose.
  • Click the "Paste pose" button. This pastes the pose we copied from frame 1 (WITHOUT flipping it) to frame 21, and is similar to using Shift D like we did for the "Wave" action.
  • In the Action Editor or in the Timeline, move the frame slider back and forth between frames 1 and 21 so see the character walk. From the first contact pose to the opposite contact pose and back to the first pose takes 21 frames in this case. Everything else in the walkcycle will be filling in keys between frames 1 and 21.


[edit] If pasting the flipped pose does not work . . .

Sometimes when you paste the flipped pose it does not work as expected. If that's the case, follow these troubleshooting steps:

  1. In the armature's Object mode, press Alt R to clear the rotation of the armature.
    • If the armature rotated at all, that was part of (or perhaps all) of the problem. The armature object needs to be at a rotation of (0,0,0) in X, Y, and Z in order to correctly mirror poses.
    • To fix it, use Ctrl Z to undo the clearing of rotation.
    • Then, while still in Object mode, press Ctrl A. A dialog box will ask, "Apply scale and rotation." Click on the dialog to accept. This resets the reference point of rotation, and forces the current rotation to be (0,0,0).
    • Now try copying and pasting a flipped pose.
  2. If that doesn't do the trick, it's time to check bone roll angles.
    • In the armature's Edit mode, press N to show the Transform Properties panel. #*With a bone selected, there should be a number field for Roll. This number should be zero. If it's not, type in a zero. Sometimes an IK constraint will cause this number to be something like 0.001, even after you type in a zero, but that's close enough.
    • Now try pasting a flipped pose.

Making changes to the armature this way will probably mess up your existing poses and actions, so you'll have to redo them.

[edit] Recoil pose

We made a first cut at a walkcycle with just one pose and a couple mouseclicks! Next, we'll improve the walk by adding poses in between the ones we just created.

The recoil pose is when the front foot takes the weight of the body. The front foot flattens, and the body bounces down a little.

  • Move to frame 2.
  • Clear the rotation of leg.r with Alt R.
  • Set a rotation key, but without rotating the bone, by pressing R-Enter.
  • Grab the spine1 bone and move it down a small amount. I ended up pressing G, then hitting the a couple times to move it a small amount.
Recoil pose.
  • Only Side view is shown, since it shows everything that changed.
  • Copy this pose, and paste the flipped pose 10 frames later in frame 12.


[edit] Passing pose

Passing pose.
  • Move to frame 6.
  • Adjust leg.r and toe.r so that the foot is flat on the ground.
  • Move spine1 up so that the right leg is mostly straight.
  • Once you're done, copy the pose and paste the flipped pose 10 frames later in frame 16


[edit] High point

High point pose.
  • Move to frame 8.
  • Rotate the leg.r so it points down more.
  • Rotate toe.r so it hits the floor.
  • Move spine1 up a little bit. spine1 should be at its highest point in this pose.
  • Paste the flipped pose to frame 18.


[edit] Viewing the animation

Set the Start: and End: frames in the Timeline window.
  • In the Timeline window, set the Start: frame to 1 and the End: frame to 21. This will only play the animation for these frames (they are the only frames where we have keyframes).
  • In the 3D Window, press Alt A to start the animation. You can rotate the view around and even zoom while the animation plays (but you have to use Ctrl MMB Image:Template-MMB.png instead of MW Image:Template-MW.png).

[edit] Tweaking the walkcycle

You could spend many hours tweaking a walkcycle. I added a little bit of a delayed head-bob and a little secondary movement on the hands and toes. For inspiration, check out the BioMotionLab Walker site.

You can download the .blend file so far here: Media:WalkcycleTest.blend

Summary
We created a new Action and animated a walkcycle in the Action Editor. Next, we'll mix the "Wave" action and the "Walkcycle" action together.


Next:Using the NLA Editor

Previous: Animating a simple action

Back to Index