next up previous
Next: Bibliography Up: Single Sample Soft Shadows Previous: Results


Appendix: Example occluders

For a shadow ray $\mbox{${\bf p}$} = \mbox{${\bf o}$} + t\mbox{${\bf\hat{v}}$}$ toward a light with position ${\bf l}$ and diameter D, and a sphere with center ${\bf c}$ and radius R, we need to decide whether we are in the penumbra region, and if so, what is the value of $\tau$, the fractional distance between umbra and penumbra boundaries. We first compute the distance t0 to the point on the shadow ray closest to ${\bf c}$: $t_0 = (\mbox{${\bf c}$} - \mbox{${\bf o}$}) \cdot \mbox{${\bf\hat{v}}$}$. If t0 is negative, then s=1. We then compute b by assuming $a \approx t_0$, $A \approx \Vert \mbox{${\bf l}$} - \mbox{${\bf o}$} \Vert$, so we use

\begin{displaymath}
b = \frac{D t_0}{\Vert \mbox{${\bf l}$} - \mbox{${\bf o}$} \Vert}.
\end{displaymath}

We compute the value of the minimum distance d from ${\bf c}$ to the ray:

\begin{displaymath}
d = \Vert t_0 \mbox{${\bf\hat{v}}$} - \mbox{${\bf c}$} + \mbox{${\bf o}$} \Vert .
\end{displaymath}

If this distance is between R and R+b then we compute $\tau = (d - R) / b $ and then compute $s(\tau)$. If d < R, s = 0, and if d > R+b, s = 1. The radius of the bounding volume for the sphere for shadow ray testing is R + bmax where bmax is a function of the largest light and cannot be larger than Dmax.

For triangles, the outer object is a triangle with rounded corners. The offset is different for each side of the triangle and is proportional to the cosine of projected triangle normal and the vector ${\bf\hat{v}}$.

Figure 6: a: geometry for spherical occulder. b) geometry for triangular occluder.
\begin{figure}
\centerline{
\epsfig{figure=geometry.eps,width=0.8\columnwidth}
}\end{figure}


next up previous
Next: Bibliography Up: Single Sample Soft Shadows Previous: Results
Comments: Brian Smits
1998-10-27