James Vanderhyde
CS 7490 Advanced Image Synthesis
Dr. Greg Turk
2 May 2003

Distribution Raytracing


In 1984, Cook, Porter, and Carpenter published a paper called "Distributed Ray Tracing." This is a very interesting work that explains how render phenomena such as soft shadows and glossy reflection that traditional ray tracers could not handle. In this project we undertook to implement the ideas in this paper in a ray tracing engine coded from scratch.

Compiling and Running

Email me for the code. It requires Java 1.4 to save the output as a PNG file. If you don't have Java 1.4, you can use Java 1.2 if you open up Renderer.java and comment-out the body of the public void saveImage(String fname) method. If you want a command-line interface (only useful if you can save the output, and PNG is the only implemented format currently), compile with javac Renderer.java. If you would like a window interface, use javac Raytracer.java. Then use java Renderer filename.scene to render a scene written in our special scene language, or use java Raytracer and open a scene file from there. Choosing "New" in the "File" menu renders a sample scene, as does the command-line version if no file is specified. For the window version, make sure you have the Raytracerstrings.properties file in the same directory as the Raytracer.class file.


This is the sample scene, run on the recursive ray tracer, but without distributing the rays. Sixteen rays are shot for each pixel, in a regular grid in the pixel. The triangle is an area light source, but it is treated as a point light source here.

This is the sample scene, run with distribution. Each pixel is split into four subpixels, and five rays are shot through each subpixel, each at a random point. Note the soft shadows from the area light source.

This is the same thing, except this has sixteen subpixels and 200 random rays for each subpixel. This took a little over four hours on a 700 MHz Power Mac G3.

Finally, a sample scene, read in from a file. We apologize about the camera angle. It is supposed to be a ball on a table. The ball and table are lit by two "windows" (rectangular area light sources). Notice the glossy reflection in the table of the hard reflection in the ball of the window. Compare the run of 16 subpixels and 10 rays per subpixel (80 minutes) to the run of 1 subpixel, 1 ray per pixel (less than 1 minute).