i
i
i
i
i
i
i
i
512 11. Non-Photorealistic Rendering
boundary of an object. For example, in a side view of a head, the computer
graphics definition includes the edges of the ears.
The definition of silhouette edges can also sometimes include bound-
ary edges, which can be thought of as joining the front and back faces
of the same triangle (and so in a sense are always silhouette edges). We
define silhouette edges here specifically to not include boundary edges.
Section 12.3 discusses processing polygon data to create connected meshes
with a consistent facing and determining the boundary, crease, and material
edges.
11.2.1 Surface Angle Silhouetting
In a similar fashion to the surface shader in Section 11.1, the dot product
between the direction to the viewpoint and the surface normal can be used
to give a silhouette edge [424]. If this value is near zero, then the surface is
nearly edge-on to the eye and so is likely to be near a silhouette edge. The
technique is equivalent to shading the surface using a spherical environment
map (EM) with a black ring around the edge. See Figure 11.5. In practice,
a one-dimensional texture can be used in place of the environment map.
Marshall [822] performs this silhouetting method by using a vertex shader.
Instead of computing the reflection direction to access the EM, he uses
the dot product of the view ray and vertex normal to access the one-
dimensional texture. Everitt [323] uses the mipmap pyramid to perform
the process, coloring the topmost layers with black. As a surface becomes
edge-on, it accesses these top layers and so is shaded black. Since no vertex
interpolation is done, the edge is sharper. These methods are extremely
fast, since the accelerator does all the work in a single pass, and the texture
filtering can help antialias the edges.
This type of technique can work for some models, in which the as-
sumption that there is a relationship between the surface normal and the
silhouette edge holds true. For a model such as a cube, this method fails,
as the silhouette edges will usually not be caught. However, by explicitly
drawing the crease edges, such sharp features will be rendered properly,
though with a different style than the silhouette edges. A feature or draw-
back of this method is that silhouette lines are drawn with variable width,
depending on the curvature of the surface. Large, flat polygons will turn en-
tirely black when nearly edge-on, which is usually not the effect desired. In
experiments, Wu found that for the game Cel Damage this technique gave
excellent results for one quarter of the models, but failed on the rest [1382].