Accelerated Ray Query with Index Images

The method described here takes advantage of the fact that in plant scenes very seldomly must reflection rays be traced. A great part of the ray query thus consists of the so called primary rays, and the number of secondary rays caused by reflection is minimal.

All primary rays start at the viewing point of the viewer using the virtual cam­era model, and penetrate through the pixels of the image to be produced. The ray query thus represents the question: Which object can be viewed in each pixel of the image to be produced?

Подпись: (a) Подпись: (b)
Подпись: Figure 9.14 Accelerated rendering for plant scenes using index images: (a) standard result with local lighting model; (b) index image with false colors to determine the first hit triangles in each pixel; (c) result using index images (c)

At this point we take advantage of the fact that the local lighting simulation can be computed very quickly via the graphics hardware, which helps to answer the question just posed. For this purpose, we produce a false color image of the scene, a so-called index image. In this image each triangle is filled with a color that relates back to its object number in the given triangle list. This number is coded in the three color channels (red, green, and blue) of the RGB color model of the computer graphics hardware, each with an eight-bit depth. In total, this way 24 bits of information are to be stored, though almost 17 million different objects per image can be coded.

The index image is produced in a preprocessing step and is transferred to the raytracing algorithm. Thus for each pixel the first hit object of a primary ray can

Chapter 9 be found in the image through extracting the color information of the respective Rendering pixel position. In practice, this method allows for a run-time reduction of 10:1,

especially if the graphics hardware is able to quickly produce and store false color images. Figure 9.14 illustrates the use of such an index image for the rendering of a shrub.

Updated: October 6, 2015 — 7:47 am