Project 1:
Motion Capture Display and Editing
DRAFT (Feb 15th) - Subject to Change!
The purpose of this project is to give you some experience dealing with
motion capture data, to experience the issues in file formats for motion
data, to gain intuitions for how motion editing techniques work, and to
work through the details of an animation methodology from a research paper.
The Basic Idea:
You must write a program that reads BVH files (a standard skeletal animation
data file format) and displays them in an interactive viewer. You must
implement a variant of path editing to allow the user to alter the motion.
You must implement some kind of motion blending and the ability to concatenate
motions (play motions one after another).
Ground Rules
You are to work on this project in groups of 2.
Your program must run on the Windows machines in B240. Other than that,
you may use whatever tools you want to build your program. Write it in
C++, Java, Matlab, or whatever you want to get the job done. Personally,
I suggest using C++ and FlTk and OpenGL.
If you are going to incorporate something other than a basic graphics/UI
library (like OpenGL, FlTk, or GLUT), please ask me. Generally this is
OK, but I want to make sure you actually implement the parsing and display
code.
You may use utilities and libraries that you find, subject to approval.
Any "borrowed" code must be clearly documented. Copying someone's
assignment from a previous year is not OK.
Reading Files
Your program must read "Biovision hierarchy files."
Motion capture file formats are documented in a set of notes
by Jeff Thingvold (now at Motion Analysis). These notes are 3 years old,
but they are still useful. The BVH file format documentation is somewhat
vague, but its a vague format. The "original, official" specification
was some hand sketched notes by some people at BioVision (I have a copy
of those notes, and they aren't too helpful).
In the directory p:/graphics/public/Data/Motion, you will find lots of
BVH files to experiment with. You will see all sorts of different skeletal
configurations, joint types, and other variations of the file formats.
In the ideal world, you would be able to read any BVH file we threw at
your program. More realistically, we would like your program to understand
some subset of them. The larger the subset, the better (and this will
be rewarded in grades). Some ground ground rules:
Your program should not crash on a file that it cannot understand.
Your program must read at least 5 of the files in the Motion directory.
You can pick the 5.
You must, in your documentation, describe the limits of the reader. It
is much better to say "my reader only supports ZXY euler angles for
joints" than to have a reader that mysteriously doesn't work some
times.
Some reasonable simplifying assumptions you might make include: supporting
only certain types of euler angles, or only supporting a fixed topology.
(the latter is a severe limitation, and I do not recommend it).
Displaying Motion
You must provide an interactive viewer for displaying the motions that
you read in. Your viewer should use OpenGL to display things, and provide
the ability to play the motion at "frame rate" as well as the
ability to "scrub" (interactively move through frames). You
must provide some interactive camera controls so that the user can control
the view.
The nicer that you draw things, the better. Drawing lines between the
joints is the easiest, but drawing some "bones" (like ellipsoids)
looks a lot better. Skinning looks the best, but that's a really advanced
feature.
You should do some things to help make the motion easier to see - for
example, drawing "traces" that sweep out the paths of the end-effectors,
or strobes (drawing several frames simultaneously). Try being creative
in given tools to help the user visualize the motion.
Drawing a groundplane and shadows are an easy way to make things look
a lot better.
You program must be able to place the camera in a position where it can
see the whole motion (this requires you to figure out the spatial extents
of the motion). The better your program does at this, the better.
A nice advanced feature to add is a tracking camera that follows the
character as it moves. This take a little thought to do well - it can't
be too bouncy, or spin too fast, ...
You must put in a timer to control framerate. Your program must offer
the option of displaying animation at 30fps. You might want to allow other
options (like just blasting the animation as fast as possible, or allowing
for slow motion viewing).
Your program should also support showing 2 (or more) motions at once.
This will be useful for when two characters interact, as well as for comparing
motions (which you will need to do).
Forward Kinematics
Your program must compute the forward kinematics. That is, you must be
able to compute where each joint goes, and have some way to show that
you can do this. For example, you might want to draw a "trace"
line showing where the point goes.
Path Editing
You must provide the user with a way to edit the path of the motion (e.g.
if the character was walking in a straight line, you can bend it and have
it walk along a curve). The paper on path editing is here.
Note: this is not a paper we will be discussing in class. Part of the
exercize is for you to learn how to read a technical paper, figure out
how it works, and try it out. While I am biased (I did write the paper),
I think that this one isn't too hard.
Path editing has a lot of variants. Start with the most basic, and then
add features. The most basic version (ignoring orientation) should be
trivial. I expect that most people will be able to get the orientation
control. Arc-length parameterization (you'll understand what I'm talking
about after you read the paper) is clearly an advanced thing. Putting
in some kind of IK solver to cure foot skate is a very advanced feature
(but there are some simple ways to do it that might make it not so bad).
There are many other possible extensions to path editing to try. For
example, you might determine when the character is in the air, and make
sure the path doesn't bend (ideally, you could stretch the path in such
a case). You might mark parts of the motion that are not allowed to be
path editied (for example, when a character stops to pick up an object).
Rigid Transformations, Concatenating and Blending
You need to be able to apply a rigid transformation to a motion before
displaying it. This will be important for blending and concatenating.
You should have some interface for manually
You need to be able to play a sequence of motions one after another.
This involves applying the transformation such that the end of one motion
is the beginning of the next. We will provide you with examples of pieces
of motion that simple "snap together" - you will be able to
make loops and whatnot using them by playing one after another. You might
want to be able to set up your interface so that you can load in a bunch
of motions and play sequences of them.
You need to be able to blend 2 motions together (with varying blend weights).
For example, to make a transition between one motion and another. This
means that you must be able to rigidly transform motions (so that they
line up well enough) and time shift things. If you want to do better (implement
time warps or something that's a bonus).
Note: the blending can be completely manual. However, you must be able
to position the two motions relative to one another, and set the time
shift.
Requirements
You must turn in all files required so that we can run your program,
documentation on how to use your program (including a description of limitations),
and a description of your programs features.
The basic project would include:
- reads many BVH files, with some restrictions
- is able to read in 2 BVH files simultaneously and show them together.
- displays ellipsoids or other rigid shapes for bones
- places the camera automatically, and gives a camera user interface
- implements basic path editing (with orientations handled correctly)
- is able to position motions (under user control) and concatenate and
blend them
It is better to have a project that does all of the basic features and
works well, than to have a project that has some fancy, advanced feature,
but fails at the basics.
An advanced project might add:
- read almost all BVH files
- display nice character geometry
- have a good camera UI that includes tracking
- implements advanced path editing (arc-length parameterizations)
Above and beyond the call of duty projects might:
- Does better alignment methods (registration curves, time warps), or
automatic methods to find alignments
- Has some methods for choosing which motions to concatenate (interactive
control, random walks, ...)
- Implement Inverse Kinematics to clean up footskate
- Do smooth skinning
- Provide other motion editing features
How will we grade it?
You will have to provide a web page documenting the project (details
to follow). You will also have to give a demo of your project (on a machine
in B240).
The Deadline
Project Deadline - March 8th - before 2:30pm. I am leaving town on March 9th,
extensions are impossible.
There will be a Checkpoint each Friday. One person from your group must
send me email and tell me about your progress:
- Feb 20 - you must tell me who your group is, and what tools you plan
on using, and assure me that you really have started working on things.
- Feb 27- you must be able to read in and display BVH file motions.
- Mar 5 - you must have at least started to get path editing to work,
and to be able to rigidly tranform motions
The deadlines are there to try and prevent you from waiting until the
last minute to do the project. Its an opportunity for you to check in
with me and make sure you aren't completely lost. All I want is some assurance
that you've gotten pieces working. If you want to show off something cool,
I'm willing to look. If you want to lie and tell me you've gotten things
to work when you haven't, you'll just get hosed when you're not able to
get the final project done on time.
|