next up previous contents index
Next: Closed Forms of the Up: Properties of the Volume Previous: Opacity and Blending   Contents   Index


Piecewise Integration

As we shall see shortly in Section 1.3, solving the volume rendering integral for all but the simplest functions for luminance and attenuation is difficult to impossible. In practice, we just perform piecewise integration. Most commonly, we segment viewing rays by the model cells that they intersect, and we integrate piecewise per segment. These segments may or may not be of uniform length, usually depending on the model rendered.

Because of the importance of piecewise integration, I will speak to how we may perform piecewise integration. Consider the volume rendering integral given in Equation 1.2, repeated here for convenience.

$\displaystyle { I(D) = I_0 e^{-\int_0^D \tau (t) dt} + { \int_0^D L(s)\tau (s) e^{-\int_s^D \tau (t) dt} ds } }$    

Let us examine what happens when we break the integrals into two segments, one in the range $ [0,x]$ and the other in the range $ [x,D]$. Without loss of generality, we can rewrite Equation 1.2 as

\begin{multline}
{ I(D) = I_0 e^{-\int_0^x \tau (t) dt
-\int_x^D \tau (t) dt} ...
...ds }
+ { \int_x^D L(s)\tau (s)
e^{-\int_s^D \tau (t) dt} ds } }
\end{multline}

We can rearrange Equation 1.9 by factoring out the constant $ e^{-\int_x^D}$ terms.

\begin{multline}
{ I(D) = { \left( I_0 e^{-\int_0^x \tau (t) dt}
+ { \int_0^x ...
...\\ {
+ { \int_x^D L(s)\tau (s)
e^{-\int_s^D \tau (t) dt} ds } }
\end{multline}

Notice that the part of Equation 1.10 in the parenthesis is equal to $ I(x)$.

$\displaystyle { I(D) = I(x) e^{-\int_x^D \tau (t) dt} + { \int_x^D L(s)\tau (s) e^{-\int_s^D \tau (t) dt} ds } }$ (9)

Finally, we can do a change of variables that will place the integral in the range $ [0,D']$, where $ D' = D - x$.

$\displaystyle { I'(D') = I(x) e^{-\int_0^{D'} \tau '(t) dt} + { \int_0^{D'} L'(s)\tau '(s) e^{-\int_s^{D'} \tau '(t) dt} ds } }$ (10)

Careful inspection reveals that Equation 1.12 is equivalent to the original volume rendering integral (Equation 1.2) for the segment closer to the eye when using the intensity of light emanating from the farther segment as the incoming light. Using this relationship, we can perform back to front rendering.

In Section 1.2.3, I show that you could express the opacity as $ \alpha = 1 - e^{\int_0^D \tau (t) dt}$ and how you can use the Porter and Duff [74] $ \operatorname{over}$ and $ \operatorname{under}$ operations described in Section 1.2.3 to blend. The same blending is valid for this piecewise integration, and we can therefore perform it easily on graphics hardware.

We can rearrange Equation 1.9 yet again.

\begin{multline}
{ I(D) = I_0 e^{-\int_x^D \tau (t) dt}
e^{-\int_0^x \tau (t) ...
...\\ {
+ { \int_x^D L(s)\tau (s)
e^{-\int_s^D \tau (t) dt} ds } }
\end{multline}

Equation 1.13 shows us how to perform front to back rendering. Using only information from the front segment (the segment closest to the viewer), you could solve the third term of Equation 1.13. Using this and the opacity of the front segment, you could use the Porter and Duff [74] $ \operatorname{over}$ operator, described in Section 1.2.3 to blend with the back segment, solving the second two terms of Equation 1.13, and combine the two opacities to allow for another $ \operatorname{over}$ operation with the incoming $ I_0$ light when it becomes available.


next up previous contents index
Next: Closed Forms of the Up: Properties of the Volume Previous: Opacity and Blending   Contents   Index
Kenneth D Moreland 2004-07-16