Why do the feet slide?


Walkers on the field

My old agent simulation Brainiac got walkers. Each one has a small fuzzy logic brain that decides when to start, walk, turn away from the edge of the field and stop. The motion itself comes from motion capture data of the CMU Graphics Lab: a real person walking, recorded at 120 frames per second. The field has waves, so the feet are put on the ground with inverse kinematics (IK).

Sounds simple. It wasn’t. The hardest part was something you notice immediately when you watch it: the feet slide.

Why feet slide at all

A recorded walk is not glued to the ground. The agent is moved by the brain, not by the recording, so the body goes wherever the brain wants and the legs just play their motion. As soon as the agent turns or walks a bit faster or slower than the person in the studio, a foot that should stand on the ground moves with the body. Animators call that foot skating.

The usual fix: detect when a foot is on the ground (slow and low) and hold it in the world with IK while the body moves on. That works… mostly.

The recording slides too

The first surprise: the data itself slides. The heel comes down while the foot still moves forward, and it goes on for a while before it is slow enough to count as “standing”. So I measured it for a couple of subjects:

Subject Slide per step
69, 16, 35 15 to 30 cm
02, 07, 104 2 to 7 cm

15 to 30 cm per step can’t be hidden by any IK without changing the walk, so I switched to subject 104. And the foot is now “planted”: held from the moment it touches down, at a spot halfway along the recorded slide. Where the leg is too short to reach that spot, the hips come down a little, at most 3 cm.

Not every step goes flat

“Low” means: close to the lowest point of the foot in the whole clip. But a person standing before setting off, or the last step of a turn, stands a centimeter or two higher than the walking steps. Those steps were never detected as steps at all, and the foot slid happily over the ground. The fix was to measure every step from its own lowest point instead of from the clip’s.

The ankle is the wrong point to hold

The IK goal of a leg is the ankle. The hold keeps the ankle where it is. But when the heel lifts, the ankle has to move: the foot rolls over the toes. If the hold doesn’t let go there, the leg is pulled straight while the body walks on, and when it finally lets go, the knee snaps. I had a 44° knee snap in a single frame at some point.

So the hold lets go when the heel lifts. And from that moment nothing keeps the foot in its place:

Toe during a step

Same step, same camera, five moments from the foot settling to the push-off. The yellow line is where the toe was at the start.

  • Recorded motion: no IK at all. The toe creeps about 5 cm to the left.
  • Ankle held: fine while the foot is flat, then the hold lets go and the toe creeps the same way.
  • Ankle held, then the toes: the toe stays on the line, the foot tips onto it, and it only leaves at the push-off. 0.2 cm in this step.

Rolling onto the toes

The last row needed a second goal per leg: while the heel lifts, the solver keeps the tip of the toe where it is in the world and turns the foot so that the ankle stays within reach of the leg. The leg alone can’t do it, at the push-off it is nearly straight. The foot has to tip further onto its toes.

My first version kept the toe in place only over the ground and let it follow the recorded height. Looked fine in all my numbers. Then I watched it frame by frame: the toe lifted 6 cm in its place, the foot floated up like a ballet dancer. In the recording the foot moves forward while it lifts, so it reads as a step. Pinned in place it reads as floating. Now the toe stays on the ground until the push-off.

Other things on the way

  • Two actions fading into each other (walk into stop) each held the foot at their own spot, and the mix moved it.
  • The capture data has jumps: in one place the pelvis turns 7.6° within a single recorded frame and keeps the new angle. That is the solver of the capture system, not the person. It showed up as the hips twitching.
  • In a turn the foot pivots and its speed jitters around the threshold, so one noisy frame ended a roll before it started.

Lesson learned

I had tests for everything: held feet slide less than 2 cm, knees never turn more than 20° per frame, no foot jumps. All green. And still most of the glitches were found by looking at single frames: “check frames 745 to 755, the foot slides”. A test only checks what you thought of. For things that should look right, watch them.