CpSc 465, Principles of Computer Graphics

Assignment 5

due May 19

This final assignment pulls together everything you've learned this semester. Your program should read 3d objects from a file and render them with lighting, shading, and interaction.

Object Files

You will need to choose a 3d file format for use in your project. I recommend either the PLY Polygon File Format or the Wavefront OBJ file format. Both formats have both ASCII text versions, and are fairly straightforward. Additionally, there are interesting 3d models available in both formats: Note that you may not need to use all of the information in a given object file. It may be enough to extract vertex coordinates, faces, and vertex normals.

Rendering

Render your model in wireframe and with GL_FLAT and GL_SMOOTH shading. Include two different light sources with different positions, colors, and intensities, and allow them to be turned on and off independently. Additionally, render your model using several different materials, either formulating your own material properties or using another source such as this table of Parameters for Common Materials from the ACM SIGGRAPH 2000 tutorial in Advanced Graphics Programming Techniques using OpenGL.

Interaction

The user should be able to look at the model from different angles by rotating with the mouse. In addition, provide controls (via keyboard, menu, or both) to: Be sure to document the controls.

Hints

The easiest way to begin is probably by starting with your trackball code from Assignment 3. Replace the temple with a hard-coded wireframe model, preferably a simple one such as this cup. Once you can see the cup on the screen and move it around, only then should you start working on reading the objects from a file or adding lights and materials.