MCIS 625: Computer Graphics
Winter 2004
WEEK 11
Instructor: Dr. Michael Laszlo
Assignment
The center of projection (COP), is positioned within the 3D scene, and an image plane is also positioned. Rays are cast from the COP through a window in the image plane into the scene. The window is subdivided into pixels, corresponding to the pixels of the frame buffer. In the simplest case, one ray is cast per pixel. The color of the raya function of the ray's interaction with the objects in the sceneis assigned to that pixel. The image is complete when every pixel has been assigned a color.
In ray casting, only a single ray (known as a primary ray) is cast from the center of projection through each pixel of the image-plane window. Which surface a primary ray hits first, and the surface's orientation at that point, determine the color of the corresponding pixel. Ray casting is a visible-surface determination method, but it does not account for visual phenomena such as refraction and reflection.
In ray tracing, additional rays known as secondary rays are spawned as primary rays hit objects. These secondary rays account for the reflective and refractive properties of materials that are hit. As secondary rays strike objects, they in turn spawn more secondary rays resulting in a ray tree. Ray tracing is much more costly computationally than ray casting due to the large number of secondary rays that must be cast, but the images it produces are more realistic.
Ray tracing is so time consuming because of (a) the time it takes to calculate ray/object intersection points and (b) the vast number of such intersection calculations to be performed. Methods for accelerating ray tracing focus both on speeding up such calculations, and on reducing the number of such calculations that must be performed. These methods are critical for making ray tracing practical, and are an even more important factor than the CPU's speed (i.e., ray tracing goes faster with good acceleration methods on a slow CPU than with no acceleration methods on a fast CPU). Parallel processing is also used to accelerate ray tracing; since each ray interacts with the scene independent of all other rays, each ray can be assigned its own processor.
Persistence of Vision (POV) is a public domain ray tracers that runs on many platforms including PCs, Macs, and UNIX. It supports a range of primitive objects as well as constructive solid geometry, and uses acceleration methods to speed up the ray tracing process. The site contains ray traced pictures and links to other sites containing even more pictures.