CSE 557: Computer Graphics

Autumn Quarter 1995


Project 3: Trace


Date Assigned: Wed, Feb 26
Date Due: Mon, Mar 10

Project Description

Trace is a program that takes Inventor scene files as input and generates ray-traced images.

Getting Started

To install the starting point source code, run the installation program by clicking here OR copy all of the files from /cse/courses/cse457/projects/trace.

Example Solution

Before you begin coding, you should run the example solution. The binary is also available in /cse/courses/cse457/bin/trace_example_95f. It has all of the requirements implemented as well as adaptive antialiasing, distributed antialiasing, softshadow, texture, fog, and a customized intersection routine for cube.

Required Extensions

Each project team must make the following extensions to the recursive RayTrace() function (found in the file RayTrace.c++)
  1. Phong specular-reflection model (see Foley, et al., sections 16.1 and 16.2.5).
  2. Contribution from multiple light sources: and light attenuation as described in Foley, et al., section 16.1 (particularly in 16.1.5 and 16.1.6).
  3. Shadows. (Foley, et al., sections 16.12 and 16.4)
  4. Reflection. (Foley, et al., section 16.12)
  5. Refraction. (Foley, et al., section 16.12)
Additional information about the programming details of this project and use of the starting point code is available in project 3 help session.

Bells and Whistles

You are encouraged to go beyond the minimum project by implementing bells and whistles from the approved list, or by thinking up your own unapproved extensions.

Approved Bells and Whistles

[Whistle] Add texture mapping support to the program. One of the spheres in spheres.iv has a wood texture defined for it.


[Bell]" Implement light attenuation due to fog, smoke, and haze (all three). See man page on SoEnvironment for details. You can use SceneViewer (or edit the .iv file directly) to specify fog color, type (fog/smoke/haze), and visibility distance in a scene (.iv) file.

[Bell]" for one, [Bell&Whistle] for both
Add a menu option that lets you specify a background image to replace the environment's ambient color during the rendering, and/or add a menu option for reflection (environment) mapping (see Foley, et al., Section 16.12.1 and 16.6).

[Bell&Whistle] Implement antialiasing by adaptive sampling, as described in Foley, et al., Section 15.10.4.


[Bell&Whistle] Implement a more realistic shading model than Phong's. See Foley, van Dam, Feiner, and Hughes, Section 16.7.


[Bell&Whistle] Implement bump mapping, as described in Foley, et al., Section 16.3.3.


[Bell&Whistle] for first, [Bell] for each additional
The ray intersection routines provided by Inventor are not optimized for a ray tracer. Currently, the starting point program provides a customized intersection routine for Spheres. Write your own object-ray intersection function to handle one or more of other Inventor object types such as cones, cubes, cylinders, or Quad-Meshes (as created with Sweeper).

[2 Bells] Implement solid textures or some other form of procedural texture mapping, as described in Foley, et al., 20.1.2 and 20.8.3.

[2 Bells] Extend the ray-tracer to create Single Image Random Dot Stereograms (SIRDS). Click here for a brief explanation of how to view them, and click here to read a paper on how to make them. This page may also have some helpful information.

[2 Bells] for first, [Bell] for each additional
Implement distributed ray tracing to produce one or more or the following effects: depth of field, soft shadows, motion blur, or antialiasing (see Foley, van Dam, Feiner, and Hughes, Section 16.12.4).

[2 Bells&Whistles] Implement ray-intersection optimization using either hierarchical bounding volumes or spatial subdivision (see Foley, et al., Section 15.10.2).

And finally...

When you are finished with this assignment, type "make clean" to clean up unnecessary disk space.