top of page

Requirements

In this class exercise, we were asked to create one walk cycle using forward kinematics and inverse kinematics, respectively, and then render a few loops of the cycle for both animations.

Readme

The FK part of the exercise just follows the textbook. Because the text only introduces a single stride of the right leg instead of a complete walk cycle in which both legs make a stride, I need to complement the whole cycle with the aid of the first half. To that end, I copied the animation curves of the right leg and arm to the left and vice versa in Graph Editor. Careful calculation of frame numbers is needed to fit the cycle exactly. Note that since Maya is not smart enough like Unity to connect corresponding joints correctly, e.g., it is possible that Maya connects the animation curve of right knee to the left hip, I had to manually copy these curves separately, but it's still better than copying the rotation values of joints in Channel Box one by one and keyframe by keyframe. Anyway, the animation curves of positions and rotations of the torso can be copied in batch, and I had to do the copy work only once. A hint: it is recommended to copy the torso first so that we can check if the copy resulted in an expected pose. To render a few loops of the walk cycle, I copied the animation curves of the cycle four times. Because the walk animation starts at still stand, I want to have the character stand at the end of the loop. So, I 1) made an extra copy of the cycle, 2) find a frame in it that looks closest to still stand, 3) set keys to all the joints in this frame, 4) deleted all subsequent keys. Note here that the deletion may cause some curves to change its shape in previous frames because the spline tries to keep smoothness, causing perhaps the character dipping too deep into the ground, so in general one more key frame is need right before. But here it happens that the previous frame has been keyed so no need to do it. 5) Copied the keys in the first frame 9 frames after the approximate still-stand frame. Finally, batch rendering on my lab desktop using mental ray with Lanczos filtering enabled generated the animation video. As for posing and timing is concerned, since the stride is rather wide in this animation which gives us an aggressive walk, I leant the character forward in accordance with [1] (P101). The up and down movement of the head also gives weight and a masculine feeling to the character ([2], P106). This walk animation is designed in a so-called "animating on the spot" approach ([1], P99) which is a natural choice due to the freedom from FK.

As opposed to the "animating on the spot" approach, since IK plants foot on the ground, I took the approach in which the character advances along the cels, relative to the pegs ([1], P99). The animation process followed the steps in the IK section of the textbook. Like FK, the text gives only one stride which is only half of a complete walk cycle, so I copied the translations of IK handles of opposite legs to the second half to form a full cycle. Then I duplicated the complete cycle for four times for rendering. Since the character moves his body along the way, A shift of Translate Z after copy is necessary. Here I employed the fact that left foot does not move during the transition between two neighboring walk cycles to align the position of keys in the next cycle. To have the character stand still as he does at the beginning of the animation, I used the same technique as in FK. To avoid the "bent-leg" walk effect addressed in [1] (P101), I straightened the contacting leg before and after the "squash" position ([1] P98) (also called "down" position in [2]). I used FK to animate upper body such as leaning the body forward and swinging arms because, unlike feet, they are not goal-directed movements. Since the character keeps walking during the animation, I imposed a point constraint on the camera with regard to the Z-translation of the pelvis to follow the character. But that can easily produces an illusion of the "animating on the spot", so I added some primitive objects along the way. A lesson I learnt in this part of exercise is being very careful while animating the first walk cycle because any error would be propagated in all subsequent loops. I didn't notice that the foot bends into the ground in some frames until I have copied the cycle four times; I should have added one more IK handle at the tip of the foot to gain control over it.

​​

Reference:

[1] "Timing for Animation", John Halas, Harold Whitaker, Tom Sito, Second edition, 2009, Focal Press
[2] "The Animator's Survival Kit", Richard Williams, Second Edition, 2002, Faber & Faber

Downloads

Showcase

Walk cycles using forward kinematics

Walk cycles using inverse kinematics

bottom of page