next up previous contents index
Next: Linear Interpolation of Opacity Up: Linear Interpolation of Attenuation Previous: Domain of   Contents   Index


Resolution of $ \Psi $ Table

In this section, we examine the error introduced by using a lookup table to compute $ \Psi $ rather than using numerical methods to compute it directly. I arbitrarily picked a resolution of 1024 by 1024 for the table. Using floating-point values for entries, the table takes 4 MB of memory, a large texture but well within the resource limits of today's graphics hardware.

Figure 1.4: Maximum error of $ \Psi $ calculation using a lookup table with a resolution of 1024 by 1024. The error is assumed to be caused by adding or subtracting $ 1/2048$ to each $ \gamma$, which is the maximum distance between the correct value and the nearest value stored in the lookup table.
\includegraphics[bb=88 4 376 182,clip=true,width=.47\linewidth]{ray_integration/PsiGammaError} \includegraphics[bb=88 4 376 183,clip=true,width=.47\linewidth]{ray_integration/PsiGammaCumError}
(a) Absolute maximum error of $ \Psi $ table. (b) Cumulative maximum $ \Psi $ error through 100 cells.

Figure 1.4(a) shows the maximum error introduced by performing a table lookup for any $ ({\gamma}_{\,\mathrm{b}},{\gamma}_{\,\mathrm{f}})$ pair. The error, measured as the absolute difference between the correct $ \Psi $ and the nearest value in the lookup table, seldom reaches above $ 0.001$ of the maximum intensity of the display device, which is below what the human eye is likely to discern. However, these values can be misleading. In practice, we use the value of $ \Psi $ to compute the color of a ray segment through just one of many cells.

It is fortunate that the $ \Psi $ table error is minimized when values of $ \gamma$ are close to zero (i.e. the cell is nearly transparent). When the opacity is low, many cells determine the value of the final ray color. When the opacity is high, only the closest few cells contribute to the final ray color. Figure 1.4(b) demonstrates the maximum cumulative error that can occur through 100 cells. As can be seen, although the error for one cell is small when the opacity is lowest, the cumulative error is highest in this region.

Note, however, that although we see potentially high errors, they occur only in pathological conditions with minimal attenuation and maximum fluctuation in luminance. Such errors are therefore unlikely to occur in practice. We can reduce the potential error by increasing the resolution of the lookup table or performing linear interpolation among values when performing the lookup.

Figure 1.5: A comparison of ray-integration approaches that linearly interpolate the luminance.
Image spheres_alaa.png Image spheres_ppi.png
(a) Average Luminance and Attenuation. (b) Partial Pre-Integration.
Image spheres_llla.png
(c) Linear Luminance and Attenuation.
Figure 1.5 compares various approaches for performing ray integration. The approximation that averages both the luminance and the attenuation has obvious errors where the blue is bleeding through the yellow. Partial pre-integration eliminates these errors. The numerical methods from Williams, Max, and Stein [105] give equally good results, but, as we shall see in Chapter 1, this approach takes over an order of magnitude longer than partial pre-integration to compute.


next up previous contents index
Next: Linear Interpolation of Opacity Up: Linear Interpolation of Attenuation Previous: Domain of   Contents   Index
Kenneth D Moreland 2004-07-16