Computer Graphics, Fall 2025

Michael Kazhdan


Assignment 4: Keyframe Animation

Due on December 7 (Sunday) at 11:59 PM

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


Announcements


Overview

In this assignment you will animate motions for an articulated humanoid 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 so that the articulated figure performs animated actions (e.g., walks, dances, etc.).

An overview of the code you will be using can be found here.

An overview of the .ray file syntax can be found here.

An overview of the .key file syntax can be found here.

Sample actor and key-frame files can be found here.

A (Windows x64) compiled version of the renderer implementing some of the basic features can be found here.

A (Linux) compiled version of the renderer implementing some of the basic features can be found here.

The OpenGL programming Guide is an invaluable resource in assisting with OpenGL implementation. You can find a link to the guide here.


Getting Started

You should use the same code-base as in previous assignments (Assignments.zip), as a starting point. As in the previous assignments, code modification should be relegated to the *.todo.cpp files.

After you copy the provided files to your directory, the first thing to do is compile the program. To do this, you will first have to compile the JPEG library and then compile the assignment4 executable.

On a Windows Machine
Begin by double-clicking on Assignments.sln to open the workspace in Microsoft Visual Studios.
On a Linux Machine

Code Modifications

The code you will be starting with in this assignment is essentially the same code you used for the previous assignment. However, there are a few small changes:

Code Outline

In addition to rendering static models, this assignment will allow you to render animated 3D models. The key to doing this is the class DynamicAffineShape (in Ray/shapeList.[h/cpp]). which represents a transformation node in the scene-graph hierarchy whose value is a function of the time elapsed. This object stores a pointer DynamicAffineShape::_matrix to a Matrix4D. At each frame, the transformation DynamicAffineShape::_matrix is changed, and as a result, OpenGL renders a new image.
More specifically, animation is achieved through the use of the template class KeyFrameData (in Ray/keyFrames.h and Ray/keyFrames.inl). This class:

The samples for the values of the transformations are represented by a templated object of type TransformationParameter< RotationParameterType >. The translation component of the transformation is stored in the Point3D member TransformationParameter::translation and the rotation is stored in the RotationParameterType member TransformationParameter::rotationParameter. In your implementation, the template parameter RotationParameterType will be one of the following RotationParameter types: While these classes represent transformations in different ways, they all store data that support addition, subtraction, and (right) scalar multiplication.

How the Executable Works

The executable takes in as a mandatory arguments the input (.ray) .ray file name. Additionally, you can also pass in the dimensions of the viewing window, the complexity of the tesselation for objects like the sphere, the cylinder, and the cone, the manner in which rotations should be parameterized, and the way transformations should be blended. It is invoked from the command line with:
% Assignment4 --in <input ray file> --width <width> --height <height> --cplx <complexity> --parameter <matrix representation> --interpolant <interpolation type>
The --parameter argument specifies how the rotations will be parameterized. Options include The --interpolant argument specifies how transformations should be blended. Options include: Feel free to add new arguments to deal with the new functionalities you are implementing. Just make sure they are documented.

What You Have to Do

The assignment is worth 15 points. The following is a list of features that you may implement. The number in parentheses corresponds to how many points it is worth.

The assignment will be graded out of 15 points. In addition to implementing these features, there are several other ways to get more points:

It is possible to get more than 15 points. However, after 15 points, each point is divided by 2, and after 17 points, each point is divided by 4. If your raw score is 14, your final score will be 14. If the raw score is 18, you'll get 16.25. For a raw score of 21, you'll get 17.


What to Submit

Submission intstructions are specified here.
Note that the autograder does not grade your submission. Passing the autograder only means that an image has been successfully generated.
Please include the following in your submission: