![]() |
Although the plot in Figure 1.6(a) is
mostly flat, like our approximation, there is a tapering at the corners
where the two
parameters are maximally different.
Figure 1.8 shows the plot of the cross
section between these two corners. The result looks like a parabola. We
are able to reduce the error significantly by fitting a parabola to this
plot and using
![]() |
(64) |
Our approximation of
is trivially correct when
but can have noticeable error when the two opacities are
significantly different. Because we are averaging the opacity, our
approximation yields the same result for any pair of
that satisfies
.
However,
should have smaller values when
is
larger and the front color becomes more predominant than the back color.
We can capture this effect by using a weighted sum for
rather
than an average. Using
| (65) |
![]() |
![]() |
| (a) Error of original approximation of |
(b) Error of adjusted approximation of |
Appendix 1.6 lists Cg code that can use to perform this improved volume rendering integral approximation. When compiled with the latest NVIDIA Cg compiler, it requires 11 more instructions than the code listed in Appendix 1.6 for the approximation given in Section 1.3.1.
![]() |
![]() |
| (a) Average color and opacity. | (b) Linear color, average opacity. |
![]() |
|
| (c) Linear color and opacity approximation. | |
Figure 1.10 compares various approaches for performing ray integration. The approximation that averages both the luminance and the opacity (Figure 1.10(a)) has obvious errors where the blue is bleeding through the yellow. The approximation that averages the opacity but linearly interpolates the color, introduced in Section 1.3.1, (Figure 1.10(b)) is a vast improvement. The same errors still exist, but are vary faint. The approximation for linear luminance and opacity introduced in this section (Figure 1.10(c)) reduces the errors yet again.