CS 6491, Fall 2006

Project 3: OpenGL Animation

Due: Friday, October 27, 2006, 11:59pm


Overview

The goal of this assignment is to create an animated scene using the OpenGL graphics library. Because you will be using OpenGL routines, your code should run fast enough on a PC for you to have images generated at several frames per second.

Objectives

You will write a program that, when executed, will draw a series of images that make up a short animation. You will use OpenGL to do all of the drawing.

Your images will contain several objects of your own choosing. These objects can be created in either of two ways. First, you can write special-purpose code to draw objects such as a cube, cylinder, cone or sphere. Second, it is fine for you to use models that you read in from a file. We do not care where these model files come from so long as you are not violating any copyright laws. The purpose of this assignment is to piece together and animate a scene containing several objects, and we do not want this assignment to be difficult in terms of creating the objects. Here are the items that must be demonstrated by your program:

We will be looking for each the above items in your animation program. Missing any of the above elements will cause a deduction in your grade for this assignment.

In addition to the above items, 20% of your grade for this project will be based on the quality of the scene that you create. If you create a very simple program that meets the above requirements, your final grade will be 80 points out of 100. If you show thought, creativity and enthusiasm with your scene, then you will earn a higher score.

To grade this assignment we will be compiling and linking your code on a Windows PC. It is important that you fully test your code on a PC to make sure it works, but you can develop your code on other platforms if you like.

Provided Code and Suggestions

We provide for you two example programs that creates a window and uses OpenGL to draw simple scenes. Both of these examples can be downloaded here: prog3.zip. This code is set up to run using Microsoft Visual Studio 6 or Microsoft VS.NET, which you can run on the CoC Intel cluster. There is a file called "README.txt" in this directory that gives details to compile the code.

The program called "square.c" creates a rotating white square. The program called "animation.c" shows a rotating cube in front of a shiny sphere. Feel free to use these programs as a starting point for this assignment. The program "animation.c" is probably a better starting point because it uses perspective projection, z-buffering and a light source. The "square.c" program is more simple, however, and is a bare-bones illustration of a simple OpenGL program.

You will find that it is easiest to incorporate both camera and object motion by creating a single parameter that is your "clock". You might, for example, create a variable called "frame_count" that begins at zero and is incremented after every frame. You can then deduce the camera position and the object animation from this variable.

Your main references for this assignment will be the OpenGL Programming Guide and the OpenGL Reference Manual, and links to both can be found on our class web page.

Authorship Rules

The code that you turn in must be your own. You are allowed to talk to other members of the class and to the instructor about general implementation of the routines for the assignment. It is also fine to seek the help of others for general C or C++ programming and makefile questions. You may not, however, use code that anyone other than yourself has written. Code that is explicitly not allowed includes code taken from the Web, from books, from previous assignments or from any source other than yourself. The only two exceptions to this rule is that you should feel free to begin with the sample code that we provide and you may also use code written by others to read in individual object geometry (such as collections of polygons). Your scene assembly code and animation code should be your own. You should not show your code to other students. If you need help debugging, seek the help of the instructor or the TA.


What To Turn In

Compress all neccessary files to run your program into a zip archive and email them to the TA (jang at cc). Put "cs6491:prog3" in the subject line so that we can easily find your submission. The filename should be "p{project number}_{your name}.zip", where {your name} is your full name (last name first) without spaces. For example, Justin Jang would create "p3_JangJustin.zip" for his homework 3. When unzipped, one should be able to load the workspace (.dsw) or solution (.sln) into Visual Studio and rebuild and run it (ctrl+F5). Please delete any temporary/compiler-created files such as .obj files and .exe files before compressing. They are typically big files and will be deleted before grading anyway. For example, anything in the "Debug" or "Release" folder should be removed (except for your own data files if you have any).