cos426.jpg (39279 bytes)

Computer Graphics, Fall 99

Thomas Funkhouser


Assignment 2: OpenGL

Due: 10/17/99 at 11:59PM.

Overview

This assignment serves as an intoduction to the OpenGL graphics library.  You will required to generate a room scene which can be navigated in a walk-through fashion.  Emphasis is placed both upon the implemention of OpenGL's basic capabilities (e.g. shading. lighting, transparency, materials properties, etc.) and their use in generating more involved effects (e.g. shadows, reflections.)

Examples

Samples of last years projects are available here and below are some additional images (click to enlarge).
 
Transparency on table top 
Reflection in the floor 
Multiple light sources
Specular lighting on balls 
Shadows on the table surface 
Lamp is dynamic light source
Texture mapping on board 
Full scene antialiasing 
Replicated objects

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.  Options in bold are mandatory. By implementing all the required features, you get 8 points. There are many 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.

Getting Started

You should use the code available at /u/cs426/2/, on the MECA machines, as a starting point for your assignment. We provide you with two files: After you copy the provided files to your directory, the first thing to do is compile the program. If you are developing on a Windows NT machine, running Microsoft Visual C++, from the MS-DOS prompt, type:
% copy Makefile.nt Makefile 

% "c:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32"

% nmake
If you are developing on a UNIX machine, type:
% cp Makefile.unix Makefile 

% make
In either case an executable called scene or scene.exe will be created.

If you have trouble compiling on NT you may not have glut on your system.  First search for glut.h and glut32.lib, and adjust the first two lines of Makefile.nt appropriately.  Otherwise, download  glutdlls.zip and unzip the files into locations consistent with the first two lines of Makefile.nt.  In particular, glut.h should be located at (include_path)/GL/glut.h and the glut32.lib should be at (lib_path)/glut32.lib.

What to Submit

You should submit: The writeup should be a HTML document called assignment2.html which may include other documents or pictures. It should be brief, describing what you have implemented, what works and what doesn't, how you created the art contest images, and any relavent instructions on how to run your interface.

Make sure the source code compiles in the MECA workstations. If it doesn't, you will have to attend to a grading session with a TA, and your grade will suffer.

Always remember the late policy and the collaboration policy.

Hints

Stay tuned for more hints.

FAQ

What it a 'crystal ball' style interface?

When the user holds the left button, moving the mouse left and right should rotate the world left and right about the world's origin, and moving up and down should rotate the world up and down about its origin.  If the user hold the middle button, then moving the mouse up and down should zoom toward and away from the origin.  Some implementions also provide the ability to hold both buttons to cause mouse motion to translate the world in a plane parallel to the viewport. This should alter the origin for the previously mentioned rotations, so you might add a control to reset the origin should the user end up in a strange state.
 

Announcements

Stay tuned for more announcements.


Last update: 10/14/99 04:23 AM