CSE 457: Introduction to Computer Graphics


Project 3: Trace

Date Assigned: Friday, May 16th
Date Due: Wednesday, June 4th
Artifact Due: Friday, June 6th

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++)
    ExtensionAngelFoley, et al.
    Phong specular-reflection model 6.3 16.1 and 16.2.5
    Contribution from multiple light sources:
    • Directional lights
    • Point lights
    • Spot lights
    and light attenuation
    6.1, 6.2 16.1 (particularly in 16.1.5 and 16.1.6)
    Shadows   16.12 and 16.4
    Reflection 6.4 16.12
    Refraction 6.4 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

Each project team must implement at least one bell and one whistle + from the following list. You can add items to this list by obtaining approval from the professor or one of the TAs.

You are also encouraged to go beyond the minimum number of bells and whistles by implementing more than one 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 Angel, 10.3; Foley, et al., 16.12.1 and 16.6).

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


[Bell&Whistle] Implement a more realistic shading model than Phong's (see Foley, et al., 16.7).


[Bell&Whistle] Implement bump mapping (see Angel, 10.4; Foley, et al., 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, et al., 16.12.4).

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

And finally...

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