Blog

Walk and Run Cycle Analysis

Mar 11, 2008 in ,
I have been working on a script to analyze the movements of the feet in walk and run cycle animations. From this analysis the speed of the character can be determined, as well as when and where the feet touch the ground. Click to see the analysis in action here:

3 graphs

There are three graphs shown in the view.
  1. The bottom graph show the vertical movements of the ankle (red curve) and toe (green curve).
  2. The middle graph show the horizontal movements of the ankle (red curve) and toe (green curve). It also shows a black curve that is a weighted average between the ankle and toe curves.
  3. The top graph shows the balance of importance between the ankle and the toe, based on which is closer to the ground. This curve is used as the weighing factor for the black cuve in the middle graph.

Stance time and speed

Also, the analysis finds a "stance time" for each foot. This is the time when the foot is most firmly standing on the ground. The graphs are shown such that the stance time is always at the left side of the graph for all feet. This way, is is easy to compare the curves of the different legs and the different animations.

The stance time of a foot is determined by finding the point in time when the ankle height and toe height are as low as possible. It is important that they are both low, so rather than using the average of ankle and toe height, the maximum of the two is used.

By sampling the horisontal movement of the foot at points in time around the stance time, the overall speed that the character is moving with can be concluded. It is important to determine the movement of the foot from the part of the foot that is currently closer to the ground, thus the black curve from the middle graph is used. Using just the ankle movement or just the toe movement would give incorrect results.

Test data

I have tried to design the analysis such that it makes as few assumptions as possible. There are a few though:
  • The character must be aligned with Y = up and Z = forward.
  • The animation must contain only one cycle, i.e. one step with each foot. For that reason, skipping is currently not supported. There doesn't have to be any symmetry in the steps though, so e.g. a gallopping horse should work fine.
Currently the analysis method has been tested with a soldier character with a walk cycle and two run cycles as well as a robot character with a run cycle. I would like to test the system with many more characters and animations, including creatures with more than two legs, so I am currently looking into ways to get more material to test with. The goal is to create a robust analysis that can correctly interpret most animations that are thrown at it.
Read More »