cos426.jpg (39279 bytes)

Computer Graphics, Fall 00

Thomas Funkhouser


Assignment 3: OpenGL

Due: 10/27/00 at 11:59PM.

Overview

This assignment serves as an intoduction to the OpenGL graphics library.  You will required to generate a city scene which can be viewed interactively.  Emphasis is placed upon the implemention of OpenGL's basic capabilities (e.g. shading. lighting, transparency, materials properties, etc.), their use in generating more involved effects (e.g. shadows, reflections), and imagination in creating a city with a "mood" and interesting effects.

Examples

Samples of projects from previous years (they created a room) are available here and here.  Below are some images from one solution (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 20 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 14 points. There are many 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 code available at /u/cs426/3/, on the MECA machines, as a starting point for your assignment.
An overview of the code you will be using can be found here.  An overview of the .ray file syntax can be found here.
We provide you with: 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, double click on viewer.dsp and select build from the build menu.

If you are developing on a UNIX machine, type make.

In either case an executable called viewer (or viewer.exe) will be created.

How the Program Works

The program takes in to mandatory arguments, the input (.ray) file name. It is invoked from the command line with:

    % viewer -src in.ray

Additionally, you can specify height, width, and tesselation complexity (100-1000) as follows:

    % viewer -src in.ray -width w -height h -cplx c

What Has Not Been (Completely) Implemented

The sublcasess of Shape must implement the Shape::draw(int cplx) method. The list for which this is not implemented is:

The sublcasess of Light must implement the Light::draw(int lightNum) method. The list for which this is not implemented is: Additionally, these draw methods must be implemented: Finally, the following functions need to be implemented to support the interactive user interface:

What to Submit

You should submit: The writeup should be a HTML document called assignment3.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/or movies, 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.

Links

  • OpenGL Information
  • OpenGL Information from SGI
  • OpenGL Specification and Manual Pages
  • GLUT Information
  • GLUT Specification
  • GLUT Sample Programs
  • Hints

    Notes

    Announcements

    Stay tuned for more announcements.