Plant Images Using Raytracing

As already mentioned, raytracing is the most widely used method for the sim­ulation of global illumination. With the described spatial division methods and bounding objects, the time-consuming process of the ray query can be opti­mized. Additional optimizations can be reached with special versions of ray­tracing that are described in the following.

First two aspects for the implementation of efficient raytracing algorithms are explained, which allow for a better ray query. The first method affects the op­timal processing of rays using an efficient memory management. This is es­pecially useful when complex scenes are rendered. The second process takes advantage of the fact that in natural scenes reflection rays are rare, since they are not needed in combination with plant materials. Here, raytracing is mostly found in a simplified form of ray casting, i. e., only the primary ray per pixel has to be computed.

However, as mentioned above, within the leaves complicated conditions are present, since through a number of subsurfaces light will be scattered, and ad­ditionally the translucence must be computed. Though efficient solutions for this problem have been found, it must be noted here that the simulation of these effects causes an extreme slowing down of the rendering process, and therefore they are only used when we have to show very detailed renditions to solve special problems.

Memory Management Within Raytracing

Generally, the data of synthetic landscapes consist of a large number of trian­gles in 3d space. The memory capacity needed for this kind of data is most often much larger than the main memory capacity of the computer used. To al­low an efficient rendering under such conditions, special memory management methods are necessary. These are so-called caching procedures.

A caching method exploits the coherence in the rendering process. As in ray­tracing, rays used for the calculation of adjacent pixels will often also hit the same geometry. Thus if a smaller area of an image is computed, we can also work with a smaller amount of geometric data.

Plant Images Using Raytracing

Chapter 9 Unfortunately this is only true for raytracing with primary rays. Reflection and Rendering transmission rays can direct in all directions of the scene, and thus possibly

Подпись: Figure 9.12 Complex plant scene rendered using cache-coherent raytracing (Courtesy of M. Pharr)
hit all geometric primitives. In order to reduce in such a case the amount of geometry and texture data via caching, the order of the processing of the rays must be changed.

Instead of computing for each ray all the reflection and transmission rays to immediately calculate the final result, the rays leading into areas that contain geometric data that are momentarily not in the main memory are stored in temporary memory [159]. Here they are sorted in a way that when loading new parts of the geometric data, the respective rays can be found and worked quickly. If all rays are computed, the image is constructed.

Interesting here is the possible separation of the ray query, i. e., the tracing of the object first hit by the tracing ray, and the illumination computation. While, for example, in the first case only the geometry of the object is needed, in the second case also the texture information must be included, which again causes the amount of data to be stored to exceed the memory capacity. Thus, also this data is held in a cache.

Plant Images Using RaytracingFigure 9.13

Block diagram of a memory-efficent raytracing system

Figure 9.13 shows a scheme of such a system for cache-coherent raytracing Section 9.8

[159]. A monitoring process selects a group of tracing rays. Information about Plant Images Using Raytracing

the actual contents of the memory is used here, as well as the measure that

states how much the respective group of rays contributes to the finalizing of

the image. Then the ray query is executed, and if necessary the geometry in the

geometry cache is added. If a hitting point is found, the illumination is defined,

and the necessary textures are loaded into the texture cache. All rays that need

geometry outside of the geometry cache are stored in temporary memory. They

are only executed if the respective geometry is located in the main memory.