3D graphics eBook - Course Materials Repository
3D graphics eBook - Course Materials Repository
3D graphics eBook - Course Materials Repository
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Silhouette edge 188<br />
Silhouette edge<br />
In computer <strong>graphics</strong>, a silhouette edge on a <strong>3D</strong> body projected onto a 2D plane (display plane) is the collection of<br />
points whose outwards surface normal is perpendicular to the view vector. Due to discontinuities in the surface<br />
normal, a silhouette edge is also an edge which separates a front facing face from a back facing face. Without loss of<br />
generality, this edge is usually chosen to be the closest one on a face, so that in parallel view this edge corresponds to<br />
the same one in a perspective view. Hence, if there is an edge between a front facing face and a side facing face, and<br />
another edge between a side facing face and back facing face, the closer one is chosen. The easy example is looking<br />
at a cube in the direction where the face normal is collinear with the view vector.<br />
The first type of silhouette edge is sometimes troublesome to handle because it does not necessarily correspond to a<br />
physical edge in the CAD model. The reason that this can be an issue is that a programmer might corrupt the original<br />
model by introducing the new silhouette edge into the problem. Also, given that the edge strongly depends upon the<br />
orientation of the model and view vector, this can introduce numerical instabilities into the algorithm (such as when<br />
a trick like dilution of precision is considered).<br />
Computation<br />
To determine the silhouette edge of an object, we first have to know the plane equation of all faces. Then, by<br />
examining the sign of the point-plane distance from the light-source to each face<br />
Using this result, we can determine if the face is front- or back facing.<br />
The silhouette edge(s) consist of all edges separating a front facing face from a back facing face.<br />
Similar Technique<br />
A convenient and practical implementation of front/back facing detection is to use the unit normal of the plane<br />
(which is commonly precomputed for lighting effects anyhow), then simply applying the dot product of the light<br />
position to the plane's unit normal and adding the D component of the plane equation (a scalar value):<br />
Note: The homogeneous coordinates, w and d, are not always needed for this computation.<br />
After doing this calculation, you may notice indicator is actually the signed distance from the plane to the light<br />
position. This distance indicator will be negative if it is behind the face, and positive if it is in front of the face.<br />
This is also the technique used in the 2002 SIGGRAPH paper, "Practical and Robust Stenciled Shadow Volumes for<br />
Hardware-Accelerated Rendering"