CPSC 526: Assignment 3

Due Wednesday Oct 27 2005, in class. Worth 12%.

Working with Motion Capture Data

The goal of this assignment is to familiarize yourself with motion capture data and ways of processing it. Specifically, you will be experimenting with the creation of a motion graph from multiple motion BVH motion clips. A motion graph can be created from multiple motion clips by looking for 'similar' frames across motions (or later/earlier in the same motion clip), which then become points where the animation can transition or loop between motions if desired. This requires determining a metric for when two frames are similar, as well as implementing a blending scheme to help make the resulting transitions less abrupt. The final demonstration should ideally consist of a character doing random traversals of the motion graph, which, if nothing else can make for a great screen saver. You will undoubtedly have to make a number of adhoc decisions when implementing your solution. A crude-but-partly-working solution is greatly preferable to an approach that can be viewed as highly sophisticated but for which you have no results to show. There will also be a trade-off between having a small number of good-quality transitions, resulting in possibly rather repetitive motion, and a larger number of lower-quality transitions.

Template Code

Template code for the reading and playback of BVH files is available at:
http://www.cs.ubc.ca/~van/cpsc526/Vsep2004/mocap.tar.gz
This code will run on either Windows or Linux. The system you run it on should have the glut and OpenGL libraries installed.

There are multiple example BVH files in the bvh subdirectory with the template code. Right now the reader will only read one of these at a time (see main.cpp for where this happens). A good first step is to adapt this to be able to read in multiple compatible BVH motion clips, which can then form the basis for the motion graph. Also note that many of the BVH files do not share a common skeleton -- they may differ in terms of structure (number of joints) as well as size. And they also differ in sampling rate.

You could choose to use only the files which share a similar structure or you could attempt to convert motions to be playable on a single common character. Another alternative is to use the CMU Motion Capture Database (Google will find it), which has multiple motions for the same subject. The data here is stored in the Acclaim ASF/AMC format, for which you can write a parser or possibly download a parser. You are also welcome to search for additional BVH files to use on the web. The BVH parser is not perfect -- particularly, it will fail to parse BVH files that have newlines in unexpected places. You are welcome to implement a proper parser using your favorite parser-writing tool for bonus marks.

The BVH file format does not have a defined standard as to which direction is "up" in the world, or what units are used to measure joint offsets and translations. The template code deals with these issues by assuming that "y" is "up", and by normalizing the display scale of the character and its translations by using the longest measured offset, which is roughly equivalent to the longest limb length. This normalization happens with a simple scaling before display.

Hand In

Email me (van@cs) a URL. The URL should be the location of a web page or a tar file. Contained should be a short writeup (PDF or HTML), your source code, and a README file with any special instructions for running your code. Your writeup should describe your approach, your results, and suggestions for improvements that could be made.