Project 3: Trace

Date Assigned: Tuesday, 28 April 1998

Date Due: Tuesday, 12 May 1998


Project Description

RayTrace is a program that constructs recursively ray-traced images of fairly simple scenes.

Getting Started

To install the starting point source code, copy all the files from here. In the scenes subdirectory, you'll find some example scene files (all the files with the .out extension).

Example Solution

Before you begin coding, you should run the example executable. It has all of the requirements implemented.

Front end

You'll find some example scene files to use in the scenes subdirectory (the files with the .out extension.) You should use these scenes to test that you've got the basics working.

You can also construct you own scenes, using VRML and converting them to out files.
The VRML to Out conversion is done by logging onto one of the INDY machines in the graphics lab, in Sieg 228. You should all have accounts on these machines.


To convert from VRML to OUT:

1. Do the conversion directly with the following script, using the default lights and camera.
depeltrie% /cse/courses/cse457/bin/vrml2out filename.wrl

a .out file will be generated in whichever directory filename.wrl happens to be in.

2. Run Composer to do the conversion.
depeltrie% /cse/courses/cse457/bin/vrmltoiv filename.wrl
depeltrie% /cse/courses/cse457/bin/composer filname.iv

In composer, set the File->ExportAs option to ascii first. Then File->Export the file as filename.out.

Note: The raytracer pretends that all spheres are perfect spheres even if you have scaled or rotated them. You might want to take this into consideration when designing you're scene.

Required Extensions

Each individual must implement recursive ray tracing as described in class. This entails making the following extensions to the starting point program. (The starting point for the extensions is in the file Raytrace.c)
    ExtensionH&BFoley, et al.
    Phong specular-reflection model 14.2 16.1 and 16.2.5
    Contribution from multiple light sources:
    • Directional lights
    • Point lights
    and light attenuation
    14.1, 14.2 16.1 (particularly in 16.1.5 and 16.1.6)
    Shadows   16.12 and 16.4
    Reflection 14.2 16.12
    Refraction 14.2 16.12
You're Raytracer should trace rays to a recursive depth of 5. Additional information about the programming details of this project and use of the starting point code is available in project 3 help session.

Grading

This assignment will be worth a total of 10 points. The required extenions will be graded as follows:

Phong specular-reflection model: 3 points
Directional Lights: 1 point
Point Lights: 1 point
Shadows: 2 points
Reflection: 1 points
Refraction: 1 points
Artifact: 1 point
-------------------------------
Total: 10 points


Bells and Whistles

[whistle] Add support for materials with arbitrary index of refraction.


[whistle] Add Implement an adaptive termination criterion for tracing rays, based on ray contribution.


[bell] Add Implement spot lights.


[bell] Add a menu option that lets you specify a background image to replace the environment's ambient color during the rendering.


[bell+whistle] Implement antialiasing by adaptive sampling, as described in Foley, et al., 15.10.4.


[bell+whistle] Implement bump mapping (see Angel, 10.4; Foley, et al., 16.3.3).


[bell] [bell] [bell] Add texture mapping support to the program. An additional [bell+whistle] for adding a menu option for reflection (environment) mapping (see Angel, 10.3; Foley, et al., 16.12.1 and 16.6).


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


[bell] [bell] 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.


[bell] [bell] 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).


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


[bell] [bell] [bell] [bell] Implement a more realistic shading model. Credit will vary depending on the sophistication of the model. A simple model factors in the Fresnel term to compute the amount of light reflected and transmitted at a perfect dielectric (e.g., glass). A more complex model incorporates the notion of a microfacet distribution to broaden the specular highlight. Accounting for the color dependence in the Fresnel term permits a more metalic appearance. Even better, include anisotropic reflections for a plane with parallel grains or a sphere with grains that follow the lines of latitude or longitude. Sources: Foley et al, Section 16.7; Glassner, Chapter 4, Section 4; Ward's SIGGRAPH '92 paper; Schlick's Eurographics Rendering Workshop '93 paper.


Variable extra credit for anything else cool you can think up! Have fun!