backflip.jpg (39279 bytes)

Computer Graphics, Spring 2004

Thomas Funkhouser

Thanks to Chuck Rose for ideas, code, and data!


Assignment 4: Keyframe Animation
Due on April 19 (Monday) at 11:59 PM



Overview

In this assignment you will animate motions for an articulated figure. You will be given an articulated 3D model and sets of keyframes specifying the orientations of articulated joints at specific time steps. Your job is to interpolate the keyframes smoothly over a time interval and display the articulated figure in an OpenGL window so that it performs animated actions (e.g., walks, dances, etc.) in real time.


What You Have to Do

The assignment is worth 20 points. The following is a list of features that you may implement. The number in parentheses corresponds to how many points each item is worth. Options in bold are mandatory. You must implement two programs: a keyframe editor and a keyframe animator.

The keyframe editor is a program that allows a user to edit keyframe parameter values interactively while displaying a smooth curve interpolating the data.  should read in a .key file specifying a sequence of values for each of several named parameters at a sequence of uniformly spaced time steps and open an OpenGL display window. You should allow the user to select any of the parameters from a pull-down menu and draw a curve through the keyframe values for that parameter.  The user should be allowed to drag the keyframe values up and down while updating the curve in real time. Finally, you should allow the user to save the new keyframe values to a new .key file.  An overview of the .key file syntax can be found here, and a parser is implemented in the KeyFile::KeyFile (char* fileName) function.

The keyframe animator is a program that animates motions of an articulated figure according to a specified set of keyframes. The input to the program will be a .ray file specifying an articulated figure as a hierarchy of limbs connected by parameterized joints, specified by a new .ray file command, called #joint_begin ... #joint_end, which is similar to #group_begin ... #group end. The resulting scene graph is a hierarchy of rigid-body links connected by parameterized joints, each of which represents a single-parameter transformation (e.g., rotation) to be applied to its subtree. A .key file can be included (via the #key_file command) to specify the value of each parameterized joint at specified time steps.  Your job is to write a real-time OpenGL program that animates and draws the articulated object described by the .ray file according to the keyframes specified in the .key file. An overview of the new .ray file syntax can be found here.

By implementing all the required features, you get 16 points. There are several ways to get more points:

It is possible to get more than 20 points. However, after 20 points, each point is divided by 2, and after 22 points, each point is divided by 4.


Getting Started

You should use the following skeleton code 4.tar.gz 4.zip, as a starting point for your assignment. It is very similar to the code used in assignments #2. An overview of the code can be found here.

In addition to the code for reading and drawing .ray and .key files, we also provide you with the following code for least squares fitting of data (to be used for fitting BSpline control points):

By compiling the provided code, you will get a .ray file viewer suitable for use in the "keyframe animator" portion of the assignment. You can use this code, or any other OpenGL program, as a starting point for the "keyframe editor".


What to Submit

You should submit one archive (zip or tar file) containing:

The writeup should be a HTML document called assignment4.html which may include other documents or pictures. It should be brief, describing what you have implemented, and how you created your models.

Make sure the code compiles in the Friend workstations under Visual C++ or under Linux. If it doesn't, your grade will suffer.

Always remember the late policy and the collaboration policy.


FAQ


Last updated on 03/05/04, 2:20PM