CS559 Fall 2002: Project 3
An Amusement Park
Due Date: 5pm Monday Dec 9
Project Source Code
The Basic Task
This project is all about modeling, and gaining experience with many more of
the features of OpenGL. The starting point is a small virtual space that
consists of a grassy square with a roller-coaster track running around it. A
carriage, just a box for now, runs around the track. Your task is to model and
render the carriages and other objects in the environment.
Like project 1, this project defines a set of sub-goals with points awarded for
each goal. Unlike project 1, the goals are far more loosely defined, so there
is scope to try interesting things to get all the points available. In fact,
there are arbitrary numbers of points available because you can just keep
modeling more objects and getting more points.
You may work in pairs.
If you choose to work in a pair, then each member of the pair will get half of
the earned points. Once again the maximum number of points, per person, is 100,
but there are well over 200 points available.
Each task requires modeling some objects using one of the techniques described
in class. You will score 25 points for the first object of each type, and 5
additional points for each additional object of that type,
up to a maximum of 45 points for any one type. For instance, if you
create a texture mapped polygonal ticket booth, and a texture-mapped polygonal
roller-coaster carriage, and extrude the roller-coaster tracks, then you get 25
+ 5 + 25 = 55 points. If an object involves more than one
thing, such as a texture mapped Bezier surface, then you
can score points for both texture mapping and Bezier surfaces.
The individual tasks are:
- Texture Mapped Polygons
Add texture mapped polygon objects to the environment. Each "object" for
grading purposes consists of at least 5 polygons all
texture mapped. Different objects require different
- Hierarchical Animated Model
Add a hierarchical, animated model. Something like a ferris wheel is
a good choice, but there are lots of rides that would do.
- Parametric Instancing
Create a class of parametric objects and instantiate multiple instances
with different parameters. The objects must differ by more than a
- Sweep Objects
Add an extruded object or a surface of revolution. The natural choice is
extruded tracks for the roller coaster.
- Bezier Surfaces
Add something made of Bezier patches to the environment. A good
possibility is the roller-coaster carriage. You are not allowed to
cheat and use the OpenGL Bezier functions, and you must have multiple
patches joined with C1 continuity.
- Subdivision surfaces
Add some hills, or something else (a garbage heap) modeled as a
subdivision surface. Fractal terrain counts as a subdivision scheme.
Terrain must be texture mapped to get all the points.
To help, the code for the subdivision sphere is
- Change the Navigation System
The navigation system now is not great. Change it to something better.
To get all the points, you must have a mode where the viewer rides
Multiple objects modeled using the same technique must be significantly
different in order to gain the additional points. Objects that differ only by a
sequence of transformations are not different, nor are parameterized objects
that only differ by the parameter. Hierarchical objects with the same hierarchy
and animation are not different.
Make models that truly display the underlying technique. For instance, make
bezier surfaces that really are curvy.
The Program Skeleton
The program skeleton is an extensive piece of software. Here are some notes on
Back-face culling is turned on, so faces with normals that point away from the
viewer will not be drawn. Polygon vertex order is used to determine that
normal, so you must always order polygon vertices counter-clockwise about the
One light is defined and turned on. It is a directional light source with no
specular component, so do not define specular components for your models. The
light is coming in at an angle, so all the faces of an upright box have
different shades. With lighting turned on, you must specify normal vectors for
all your objects. (Actually, you could locally turn lighting off, but it would
Texture mapping is used for the ground plane. In particular, it uses mipmapping
and a targa image. You do not have to use either of these features with your
own texture mapping, but for anything other than the simplest textures, it is
probably sensible (and you can copy the code).
The existing simple interface uses three mouse buttons. Moving the mouse with
the left button pushed rotates the world about a fixed point - the look-at
point. Moving the mouse up or down with the middle button pushed changes the
distance from the viewer to the look-at point. Moving the mouse with the right
button pushed translates the world - by moving the look-at point in the ground
plane. It's not the best, but it is relatively simple.
Hints and Suggestions
Have fun and be inventive.
A key thing to consider is polygon count. Graphics hardware can only display so
many polygons in a second, and if you try to display too many the frame rate
will collapse. Texture maps also use memory, so too many textures can even more
dramatically affect performance. To keep polygon counts down, allow larger
errors in curve subdivisions, and avoid lots of complex terrain.
The way the train alignment is set up, it is simplest to do just a single
carriage, and a short one at that. Doing lots of cars makes it harder to keep
then on the track, although it is possible.
Make use of the OpenGL error checking mechanism. It is described in the red
Start simple - just try to get a polygon to appear in the center of the world.
The way the current carriage transformations are set up, the origin for the
train is assumed to be at the bottom (at track level).
It is OK to have multiple modeling techniques in one object. For instance, you
could have a carriage made up of some texture mapped polygons with some Bezier
patches. You get all the points if you do a sufficient amount of each
It is OK to borrow code from other sources - but not other students. You will
probably learn as much trying to figure out how someone else's code works as
you would doing it yourself.
Texture images abound on the web, so feel free to use them. Or you can use a
program like Photoshop to create your own. You might even find a use for the
Back to CS559 Home Page