CS 551/651-2: Advanced Computer Graphics

Assignment #2

Goal: Accelerate a basic polygonal ray tracer by any means desired.

Assigned: Thursday, March 1, 2001

Due: Thursday,  March 8, 2001

Relevant reading:

Relevant software:

Synopsis: You will extend the previous ray tracer to accommodate multiple objects and simple supersampling, and accelerate it using any valid technique you want.  You will be graded partly on the speed of your final program.

Details: We extend the .scene file format with a few new tokens:

T <float>
threshold, reflection recursion stops when ray
will contribute less than this fraction of pixels color

Q <int>
quality, the amount of supersampling. e.g. 2 is 2x2 oversampling

~ <float> <float> <float>
<float> <float> <float>
ambient for checker types 1 and 2

! <float> <float> <float>
<float> <float> <float>
diffuse for checker types 1 and 2

@ <float> <float> <float>
<float> <float> <float>
specular for checker types 1 and 2

$ <float> <float> 
nshiny for checker types 1 and 2

% <float> <float>
reflectivity for checker types 1 and 2

A new addition to the .scene specification: all characters following an unknown token is ignored to the end of the line.  In other words, treat any unknown tokens as C++ comment characters.  Also, please note that you are not allowed to add required tokens to the .scene spec.  A couple of people added a token for specifying the number of lights in assignment one; this is explicitly disallowed for this assignment.

For more efficient grading, this time your assignment must compile under Visual C++.  Please provide the workspace and project files.

I have picked one of the student ray tracers from the first assignment as a code base on which you may optionally build.  This code already supports the .scene extensions described above, and supports per-object bounding boxes, arbitrary numbers of objects, and arbitrary numbers of lights.  Included with the code are two sample scenes, one of which is accompanied by the resulting .ppm file.  For full credit your code should run on those scenes and generate visually identical or nearly identical results.

Grading: All assignments will be graded on a 10-point scale.  The exact speedup necessary for a 8, 9, or 10 will have to be determined upon turning, but a speedup of two orders of magnitude seems like a good target.  The single fastest assignment (that still draws a correct picture) will earn an 11.  As usual:

1 day late: 1 point off
2 days late: 3 points off
3 days late: no credit

Turning in the assignment: Before class starts on Thursday, March 8, you should send me mail with a single .zip file attached.  That zip file should contain a directory, which should in turn contain:

Advice: