next up previous contents index
Next: Linear Interpolation of Luminance Up: Color Computations Previous: Riemann Sum   Contents   Index


Average Luminance and Attenuation

Max, Hanrahan, and Crawfis [64] and Shirley and Tuchman [86] independently developed a method for approximating the volume rendering integral for unstructured grids and other arenas where resampling is not practical.

The method starts with the (impractical) assumption that the luminance along the ray is constant. Plugging this constraint in the volume rendering integral we get

$\displaystyle I(D)$ $\displaystyle = { I_0 e^{-\int_0^D \tau (t) dt} + { \int_0^D L\tau (s) e^{-\int_s^D \tau (t) dt} ds } }$    
  $\displaystyle = { I_0 e^{-\int_0^D \tau (t) dt} + { L\left[ e^{-\int_s^D \tau (t) dt} \right]_0^D } }$    
  $\displaystyle = { I_0 e^{-\int_0^D \tau (t) dt} + L \left( 1 - e^{-\int_0^D \tau (t) dt} \right) }$ (32)

We can solve Equation 1.14 for any integrable function for $ \tau (t)$. Recall from the discussion in Section 1.2.4 that we can perform piecewise integration on the viewing rays. Furthermore, it is convenient to break up the integral based on its intersection with cells. The assumption that the volume properties vary linearly through the cells is often (but not always) valid. Solving Equation 1.14 for a linear interpolation of the attenuation, we get

$\displaystyle I(D) = { I_0 e^{-\frac{{\tau }_{\,\mathrm{b}}+{\tau }_{\,\mathrm{...
...t( 1 - e^{-\frac{{\tau }_{\,\mathrm{b}}+{\tau }_{\,\mathrm{f}}}{2}} \right) }}}$ (33)

We still have a major problem with Equation 1.15: the luminance is constant. In general, we require the luminance to vary within cells just like the attenuation. Both [64] and [86] solve this problem by averaging the color over the length of the segment. When the color varies linearly like the luminance, this approximation yields

$\displaystyle I(D) = { I_0 e^{-\frac{{\tau }_{\,\mathrm{b}}+{\tau }_{\,\mathrm{...
...t( 1 - e^{-\frac{{\tau }_{\,\mathrm{b}}+{\tau }_{\,\mathrm{f}}}{2}} \right) }}}$ (34)

An interesting feature of Equation 1.16 is that it is equivalent to approximating the volume by averaging the luminance and attenuation and assuming the volume is homogeneous. This can be verified by plugging in $ L(s) = ({L}_{\,\mathrm{b}} + {L}_{\,\mathrm{f}})/2$ and $ \tau (s) = ({\tau }_{\,\mathrm{b}} + {\tau }_{\,\mathrm{f}})/2$ into the volume integral for homogeneous volumes (given in Section 1.3.3).

Figure 1.12: An example in the error caused by averaging luminance in a viewing ray. Both images show two hexahedral cells. The image on the left averages the luminance in each ray. The image on the right has correct linear interpolation.
Image twocells_avg.png Image twocells_linear2.png
(a) Averaged color. (b) Linearly interpolated color.

The biggest cause of error is that caused by averaging the luminance. Figure 1.12 demonstrates the error that can occur. When we average the luminance, the color on the back faces of the cells bleeds in through the front. Furthermore, although the color should be constant along the front face of the volume, the approximation changes at the interface between the two cells. The change in colors causes Mach bands to be visible. Mach bands are lines introduced by the human visual system in places where color changes are discontinuous. Mach bands help the visual system detect the edges of objects.


next up previous contents index
Next: Linear Interpolation of Luminance Up: Color Computations Previous: Riemann Sum   Contents   Index
Kenneth D Moreland 2004-07-16