OpenGL Programming and the Making of "Contrast"
[ r e s e a r c h ]

The Making of Contrast

I began the semester like everyone in the course, I was interested in learning graphics programming in OpenGL. What began as an exercise in building a header file with geometric primitives eventually turned into a character design workshop. How can you create action, motion, weight and balance from an inanimate object?

I spent a fair amount of time writing mathematical equations in C to programmatically explain a cylinder, cube, square, and sphere. This proved to be very helpful, since it gave me a stock agency from which to pull the actors for my film. I decided that the cube would make an excellent subject for my first attempt at programming an animated film.

The cube offered the human characteristic of struggle through it's probable mode of locomotion. Now it would have been easy to have the cube slide across a surface, but would that show weight? Would that show struggle, balance or be interesting in any way? I decided that the cube would move by pivoting on it's edges. Without legs, the cube would have to muster up the strength and throw it's weight to move forward.

The basic storyboard (see sidebars) revolved around the easy with which a sphere moves through spaces, while the cube moves slower than a turtle in molasses. The film originally was written to show a taunting sphere who constantly flaunted its ability to roll about without any effort. I decided that the struggle of the cube should be the "star" of the film, not the sphere. The cube offered more challenge in programming effective and believable movement.

So I began coding the flow of information through the program. I created a large data structure that held frame information, in and out cues, begin and end values for each movement, and movement flags. Though it wasn't the most efficient way to encode the data, I found it easy to read, and it most resembled and x-sheet familiar to an animator like myself.

The trickiest aspect of the animation programming was transforming the cube over it's pivot point, and then swapping the textures after it came a full 180 degrees over it's edge. The transformation was pretty straight forward, moving the pivot from the cubes center to it's bottom-left corner. Each side had a primary color on it, and they where all unique. So the textures followed the cubes faces, and when I transformed the cube to it's 0 degree position all of the faces were in the wrong orientation to match the last frame. Hence, the swapping of the faces.

The sound was essential in timing out the film. After I built the basic engine for the film, I recorded the sound and read it frame by frame marking cue points on an exposure sheet. The frame numbers from the exposure sheet were translated into the cubes data structure, and all that was left was to render, and then test, and then render some more, and test some more.

The finished film was a big hit, I am constantly floored by the audiences ability to derive different meanings from the most basic of actions. What was a sexist whistle blow to one viewer, was a carefree whistle to another. However the struggle of the cube was very clear. People identified with it's pain, you heard it in it's synced voice. Grunts and groans reinforced the illusion of life.

At the end of the semester, I had finished "Contrast", 4 months of OpenGL programming under my belt, and the goal of porting my OpenGL code to the RenderMan Interface for some high-end off-line rendering with surface shading and anti-aliasing.

Copyright © 1998 ralph de stefano. all rights reserved. reproduction without permission is prohibited. last modified may 5, 1998