✐ ✐ ✐ ✐ ✐ ✐ ✐ ✐
1 1
Ray Tracing
Ray tracing is a method to produce realistic images; it determines visible sur- faces in an image at the pixel level (Appel, 1968; Kay & Greenberg, 1979; Whit- ted, 1980). Unlike the z-buffer and BSP tree, ray tracing operates pixel-by-pixel rather than primitive-by-primitive. This tends to make ray tracing relatively slow for scenes with large objects in screen space. However, it has a variety of nice features which often make it the right choice for batch rendering and even for some interactive applications. Ray tracing’s primary benefit is that it is relatively straightforward to com- pute shadows and reflections. In addition, ray tracing is well suited to “walk- throughs” of extremely large models due to advanced ray tracing’s low asymptotic time complexity which makes up for the required preprocessing of the model (Snyder & Barr, 1987; Muuss, 1995; Parker, Martin, et al., 1999; Wald, Slusallek, Benthin, & Wagner, 2001). In an interactive 3D program implemented in a conventional z-buffer environ- ment, it is often useful to be able to select an object using a mouse. The mouse is clicked in pixel (i, j) and the “picked” object is whatever object is “seen” through that pixel. If the rasterization process includes an object identification buffer, this is just a matter of looking up the value in pixel (i, j) of that buffer. However, if that buffer is not available, we can solve the problem of which object is vis- ible via brute force geometrical computation using a “ray intersection test.” In this way, ray tracing is useful also to programmers who use only standard graphics APIs.
201