Cell shading is a type of shading for non-photorealistic rendering, used to render 3D objects in a cartoon style. Therefore this shading type is also known as toon shading. Lighting on objects is applied as if they have been hand drawn. In most 3D modeling programs, cell shading supports a silhouette outline of the object, to give even a better illusion of a hand-drawn image. Because silhouette rendering has been considered too CPU intensive, it is not implemented in Papervision3D. The following image on the left shows a cell-shaded teapot that was created with Papervision3D. The image on the right is a cell-shaded and silhouette-rendered teapot that you can make with a 3D modeling program.
A trick to fake outline rendering is to apply a glow filter to your object. Filters and effects will be discussed in Chapter 10.
Again we have two ways to apply cell shading to our material. We can instantiate a CellMaterial
instance, or we can instantiate a CellShader
instance and use it...