The history, data, and code behind motion capture

We’ve all seen animated movie characters that appear life like in their movements and behavior. Often, their movements are modeled using Motion Capture, where the position of markers are capture with one or multiple cameras. For example, this can record the hands, arms, feet, legs, and head of a person. In this following video example, markers follow the movements of hands playing piano:

In another example, one of the earliest recordings of applying motion can be seen driving the animated “Animac” character in 1962. They called the technology “Anthropometric programming”

It took about a decade for researchers to start studying why these movements were so lifelike. In 1973, Swedish Psychologist Gunnar Johansson coined the term “Biological Motion” in his article “Visual perception of biological motion and a model for its analysis” published in the journal of Perception and Psychophysics.

So how can programmers take advantage of motion capture data to simulate biological motion? One of the easiest ways is to store the locations of points in a list, and store a sequences of these lists (a “frame”) into some other data structure.

In the following Processing program, a String data stores a series a frames separated by new line characters (“\n”), and each frame a series of points is separated by semicolons. Each point is a pair of points separated by a comma. Using the String.split function, this data can be split into arrays which are played back one at a time. Note that the Integer.parseInt function is also needed to convert substrings into numbers that can be used by the ellipse function. Each time a new frame is drawn, int frame increases by one, until it reaches the end of the array and loops back to zero (performed using the modulo of lines.length). In this way, the data behind motion capture is brought back to life.

The code for the above sketch is below, along with the String data that represents the movement:

Note that the original data for this video was parsed from a Video that was produced in 1971 by James Maas, then at Cornell University. This much more complicated Processing script uses a variant of flood-fill to identify and separate the various white points from each other.

Leave a Reply

Your email address will not be published. Required fields are marked *