| Project #2 |
3D Rendering Tool |
| due: |
Final Document due Friday, March 28th (beginning
of class). This is a fairly big project that you should approach with separate
milestones. You already have enough information to render objects in wireframe.
Information regarding the other algorithms will be covered in class over
the next two weeks. You are encouraged to use the uisGL
API. |
| objective: |
Become familiar with
3D rendering algorithms including wireframe, back face removal,
flat shading, and smooth shading. |
| requirements: |
Overall Requirements
- Write a program that will display 3D objects using several
rendering algorithms. Use a GLUT menu to specify rendering the
scene in wireframe, solid (wireframe with back face removal),
flat shading, and Gouraud shading.
- Implement the object-oriented design outlined in class. You will inherit
the uisObject class and add separate methods that render the object
in wireframe, backface removal, flat shading, and Gouraud shading. You
should also overload the input operator to read all the additional attributes
related to your new and improved object. Feel free to write additional
methods as needed.
- Implement the following rendering modes:
Wireframe - use GL_LINE_LOOP
Backface Removal - use GL_LINE_LOOP (calculate your own back
face removal)
Flat Shaded - use GL_POLYGON and the z-buffer
Gouraud Shading - use GL_POLYGON and the z-buffer
- Read vertex and face information about an object from an 3VN object
file. Format of this data file is described in Section 6.2. Note that
uisGL ignores the normal vector information. We prefer to calculate
our own normal vectors on the fly. Files are available in ~grissom/367/DATA.
Use the overloaded input operator to read from the external text file.
uisObject obj;
input_file >> obj
- Your program should be able to display many objects. An input
file will provide all necessary information for the current SCENE.
Enter the filename on the command line. A sample scene file is
available in ~grissom/367/DATA. The scene file should allow for
comments at the end of each line. You do not need to allow for
comments on their own line. Do not spend too much effort on parsing
the input file. Your solution should be able to read ANY SCENCE
FILE that meets these specs.
Eye.x Eye.y Eye.z // Camera
Center.x Center.y Center.z
UP.x UP.y UP.z
S.x S.y S.z S.w // Light source
A.r A.g A.b A.a // Ambient RGBA
D.r D.g D.b D.a // Diffuse RGBA
S.r S.g S.b S.a // Specular RGBA
# of objects to follow
object description filename // Object filename
A.r A.g A.b A.a // Ambient RGBA
D.r D.g D.b D.a // Diffuse RGBA
S.r S.g S.b S.a // Specular RGBA
Shiny // Shininess value
T.x T.y T.z S.x S.y S.z R.x R.y R.z // Transformation information
repeat for each object
|
Final Images:
|
Images displayed on your Web page should have the following
properties.
- Create a relatively complex scene include a variety of different
objects. Objects should have different colors and different surface
properties.
- Create at least three different images from separate
view points and / or separate material properties for the objects.
- Your web page should have clear descriptions of what should
be noticed in each image. This includes describing which objects
are supposed to be shiny.
|
Final Document:
|
Your final document should be in a professional
looking package that is STAPLED and includes the following:
- attractive cover page with your name and one sample image. Color images
are encouraged but not required. Include instructions for running your
application. For example:
/home/grissom/project
- printout of your elegant code for each class
- REMEMBER to make your executable open to the world
|
grading:
|
Refer to my Programming
Project Guidelines. This project is worth 10% of your final grade.
You are expected to understand and follow the CS&IS
Guidelines for Academic Honesty. Resist pressure from other students
to compromise your integrity.
Be sure to follow my recommendations in the Programing
Style Guide to receive full points for style and documentation. Adapt
the Java examples to your C or C++ code. |