CS 481/681
>
Assignment 3
CS 481/681, Spring 2004
Assignment 3
General Information
- E-mail
C++ source for the program described below to me at
ffggc@uaf.edu,
using the subject
"HA3".
(If you wish to discuss the assignment with
me via e-mail, use a different subject.)
- If possible, please send your source as an attachment to your e-mail,
rather than as part of the body text.
- Send source only! No executables, project/workspace files, etc.
- Be sure to include your name in your e-mail.
- Due: Tuesday, February 10 (any time).
- Worth: 25 points.
Homework Policies
See the
Homework Policies handout.
Program (25 pts)
There are three options for this assignment: A, B, and C.
You only need to do one of them.
Note that, for options B and C,
full credit is automatic for a program that meets the requirements.
This is not true of option A.
Program Option A: Buffers & Tests
Write a C++ program using OpenGL/GLUT
that meets the following requirements.
- Your program must draw a 3-D scene, with perspective, HSR, lighting,
and transformations implemented using the OpenGL transformation commands.
- Allow the user to modify the scene in some way.
- Do something interesting with an OpenGL buffer and/or OpenGL test.
Doing HSR with the depth buffer and depth test is not “interesting”
Neither is using the scissor test.
Some things you might do are:
- An accumulation-buffer effect, e.g., anti-aliasing, motion blur, depth of field, fade between scenes.
- Something involving the stencil buffer (the possibilities are endless).
As usual, 80% credit will be given for a program that meets the requirements of Program Option A.
Suggestions for Full Credit for Program Option A
- Use jittering to make soft shadows.
You will need to implement a shadowing technique, too, of course.
- Implement the shadows-via-projection technique discussed
last semester.
Use the stencil buffer & test to ensure that
the shadow does not extend beyond the plane it is supposed to fall on.
- Do anti-aliasing in two different ways:
with the accumulation buffer using jittering,
and with OpenGL’s built-in smoothing options.
Allow the user to compare the results of these,
along with the same scene without anti-aliasing.
- Write an interactive game that has a number of different non-rectangular displays in various places in the window.
For each of these, draw its contents using stenciling.
- Implement the shadow-volume shadowing technique (what’s that??) using stenciling.
- The usual stuff ...
- Do something else. Surprise me.
Program Option B: BSP Tree
Write a C++ program using OpenGL/GLUT
that meets the following requirements.
- Your program must draw a 3-D scene, with perspective.
- Implement and use a BSP tree to do HSR.
Allow the user to see the same scene rendered in the following three ways:
- With HSR done using z-buffering only, as usual.
- With HSR done using only the BSP-tree method (and the depth test turned off!).
- With no HSR at all.
- Either objects in the scene. or the viewer, must be able to move around enough that it is clear your HSR works
(and, in the third case above, that the lack of it makes the rendering incorrect).
- You need not do lighting.
However, when one polygon partially obscures another polygon, it should generally be clear
where one ends and the other begins.
To do this you can make the polygons different colors,
or you can use lighting,
or texturing, or any other method you can think of.
Full credit will be given for a program that meets the requirements of Program Option B.
Program Option C: Quadtree/Octree
Write a C++ program using OpenGL/GLUT
that meets the following requirements.
- Your program must draw a 2-D or 3-D scene.
If the scene is 3-D, you must have proper HSR.
- Implement and use either a quadtree or an octree.
You must use the quadtree/octree to do something that such trees are good for.
For example:
- Improving the efficiency of collision testing.
- Sparse-array storage of spatially organized data.
- HSR (for certain types of scenes).
- Storing a description of an irregularly shaped region for some purpose
(filling the region, inside/outside testing, etc.)
- Your program must have enough functionality to prove to the user that the
quadtree/octree works properly.
See Program Option B for examples of this sort of requirements for the case of a BSP tree.
Full credit will be given for a program that meets the requirements of Program Option C.
Note
Particularly well-done programs may be demonstrated in class.
CS 481/681, Spring 2004: Assignment 3 /
Last update: 4 Feb 2004 /
Glenn G. Chappell /
ffggc@uaf.edu