I had some difficulty in timing the speed of the paces in a walk and working out how many frames both front feet were down together, and how many frames both rear feet were down together, my investigation of which is posted here. It turns out however that this was not the main problem with my walk. I went right back to my keys and found I had something like this (and mirror versions of the below), which appears in countless animation books:
Fig 1. The Wrong Way? Is the XO a Key?
While this isn't strictly wrong, its very missing something. These keys are not extremes of height for either the front shoulders or the back hips. While the contact position is lower than the cross-over, the contact position is not the lowest position, and the cross-over is not the highest position. It sounds obvious, but when presented with the above sketch its easy to forget that the high position (after the XO and before the C) is actually the highest, and the low position (after the C and before the XO) is the lowest... just like in a human walk! If you're unsure on two legged walks I'd recommend reading up on them in The Animator's Survival Kit, which goes into a lot of detail explaining how key animation principles apply to the human walk.
In addition to the problem of not having any vertical extremes, you also have 2 keys per stride rather than the usual 1 key per stride common for a two-legged walk. If you're like me, you prefer to plan out your two-legged walks stride by stride (contact by contact) rather than the C-XO-C-XO etc sequence which you have to use with the above keys. In my brief experience it is much less hassle in the long run to plan your 4 legged walks in the same way as your two legged walks - with one key per stride, simply only keying the front legs:
Fig 2. One Key per Stride - The Right Way?
For the time being lock the back legs out (if you have IK/FK switching then you can just flick them onto FK and ignore them for a bit). Also check that your joint/bone hierarchy propagates out from above the front legs rather than above the back legs ie. your root-most body joint is facing from the front shoulders to the rear hips. Even if you choose not to work with one pair of legs, read on - there's important info on phasing.
Fig 3. Where to Put the Body Root and How to Animate It.
Now we've simplified the problem. You can use your front feet on IK, and the body (plus locked out back legs) to animate a normal two legged walk, a bit like this:
Fig 4. Looks Familiar?
So now put in the cross over between the two contacts, building on the interpolation the computer has given us rather than starting from scratch. Remember the cross-over is slightly higher than the contact, but still not as high as the high position (obviously). Because its a dog walk there's some really nice breaking of the joints going on at the cross over which you don't see so much in a human foot. Study this image taken from Dr Stuart Sumida's 2006 lecture on quadruped animation:
Fig 5. Taken from here.
Dr Sumida is simply the coolest paleontologist around and I strongly suggest you check out his work, and the very weird photo of him sitting in a bathtub in the middle of the desert.
Once you've got the contact and cross-over working as you would have them in a two-legged walk, go on and add the high and the low position. Watch some reference videos on you tube, or see my other dog walk post for a trace-over of the skeleton. The dog's foot swings through in the same way as a human foot swings from the low position to the high.
Fig 6. Imagine this is a Dog.
The shoulders also need to drive (lead) the movement. Remember you're meant to be working with forces not just poses. Check that the shoulders are ahead timing wise (you don't need to shuffle keys, just get the breakdown right). When you're keying the C-L-XO-H-C series remember that you should be working with the body and both feet. The ground-bound foot does a really nice successive breaking of the joints sequence as it moves from the front contact to the rear just before the lift off.
Fig 7. Successive Breaking of the Joints and Forces.
As you might have guessed from my set of keys above the head follows through vertically (unless the dog is actively moving its head around). I've offset this follow through to be completely out of phase, but on slower walks you'll probably find the phase difference is a lot less in terms of phase difference, but similarly lagging when counted in frames. Obviously if the dog's head is heavier then the follow through on the head will be later (greater phase offset) due to the increased inertia of the head, and if the dog's head is really light the follow through will only be very slightly behind the motion of the body. The head moves up and down as well as having a forward/backward tilt (which is simply drag).
Fig 8. Approximate Phase Differences in a Border Collie's Walk.
So in a slowish walk the rear legs will be contacting as the front legs are crossing over. The rear legs are actually ahead of the front legs in terms of phase difference. So if the rear legs are at the high position with the right foot in the air, then the front legs will be two positions behind at the low with the left foot in the air.
As the dog speeds up into a trot the back legs increase this difference even more so that the contact for the rear legs occurs at the same time as the contact for the front legs, but on different sides - ie. so rear right and front left contact together and vice versa. This is now four positions head in the chart below. The rear legs and the tail work in the same way that the front legs and the head worked respectively:
Fig 9. Animating the Back Legs and Tail.
You'll need to study some dog anatomy before you can apply the human walk to a dog's rear legs, but again the same principles apply with successive breaking of the joints (the foot seems to pad down as if its a soft cushion at the contact, then peel off the floor as if its slimy goo just before the lift off).
Take a look at the second pose in the above image. Two feet on the same side (the dog's left) are airborne at the same time. The dog is very unstable laterally (left to right). To make up for this, it happens when the two ground-bound feet are furthest apart and the dog is longitudinally at its most stable. Remember this simple rule and it will help you make sure you keep the rear legs ahead of the front legs rather than the wrong way around.
Fig 10. The Window of Stability.
Look for the 'window of stability' - when the two airborne legs are on the same side (in this image both on the right), the body weight is longitudinally centred over the front leg (which is forward compared to the body) and the back leg (which is backward compared to the body).
And in summary this simple table will hopefully help you understand the phasing of the front and rear legs:
|Front Phase||Front Airborne||Rear Phase||Rear Airborne|
In case you hadn't guessed: in the 'phase' column C stands for contact, L for low, XO for cross-over and H for high. In the 'airborne' column, R indicates the right leg is airborne, L indicates the left leg is airborne, and in the case that neither leg is airborne I've simply indicated which leg is furthest forward in the direction of travel.
See how what's happening to the front legs is happening two keys later than it happens to the rear legs. For example find a left forward contact for the rear legs on the table above, then search two rows down and you'll see that the front legs have a left forward contact, two keys later!
I haven't talked much about the twisting that's going on in the shoulders and hips, or the tail wag and head nod from right to left because we've only been working in side view. To give you a clue you need to be looking for a snaking or waving motion running through from the dog's head to its tail when you view it from top down. Overall its the same old rules as in a two legged walk, the hip turns to favour the leg which is furthest in front. In addition the head follows through right to left (and with side to side rotation) in much the same way that it follows through vertically.
I hope you enjoyed this extensive dog walking animation tutorial and can now animate a dog like a ninja, or even better, like a dog. Please feel free to comment below if you have any ideas, requests or suggestions!
From Standstill to a Gallop
Slow Four Legged Walks