i
i
i
i
i
i
i
i
Chapter 11
Non-Photorealistic Rendering
“Using a term like ‘nonlinear science’ is like referring to the
bulk of zoology as ‘the study of nonelephant animals.’
—Stanislaw Ulam
Photorealistic rendering attempts to make an image indistinguishable from
a photograph. Non-photorealistic rendering (NPR), also called stylistic
rendering, has a wide range of goals. One objective of some forms of NPR
is to create images similar to technical illustrations. Only those details
relevant to the goal of the particular application are the ones that should
be displayed. For example, a photograph of a shiny Ferrari engine may be
Figure 11.1. A variety of non-photorealistic rendering styles applied to a coffee grinder.
(Generated using LiveArt from Viewpoint DataLabs.)
507
i
i
i
i
i
i
i
i
508 11. Non-Photorealistic Rendering
useful in selling the car to a customer, but to repair the engine, a simplified
line drawing with the relevant parts highlighted may be more meaningful
(as well as cheaper to print).
Another area of NPR is in the simulation of painterly styles and natural
media, e.g., pen and ink, charcoal, watercolor, etc. This is a huge field
that lends itself to an equally huge variety of algorithms that attempt to
capture the feel of various media. Some examples are shown in Figure 11.1.
Two different books give thorough coverage of technical and painterly NPR
algorithms [425, 1226]. Our goal here is to give a flavor of some algorithms
used for NPR in real time. This chapter opens with a detailed discussion of
ways to implement a cartoon rendering style, then discusses other themes
within the field of NPR. The chapter ends with a variety of line rendering
techniques.
11.1 Toon Shading
Just as varying the font gives a different feel to the text, different styles
of rendering have their own mood, meaning, and vocabulary. There has
been a large amount of attention given to one particular form of NPR, cel
or toon rendering. Since this style is identified with cartoons, it has strong
connotations of fantasy and (in the West, at least) childhood. At its sim-
plest, objects are drawn with solid lines separating areas of different solid
colors. One reason this style is popular is what McCloud, in his classic
book Understanding Comics [834], calls “amplification through simplifica-
tion.” By simplifying and stripping out clutter, one can amplify the effect
of information relevant to the presentation. For cartoon characters, a wider
audience will identify with those drawn in a simple style.
The toon rendering style has been used in computer graphics for well
over a decade to integrate three-dimensional models with two-dimensional
cel animation. It lends itself well to automatic generation by computer
because it is easily defined, compared to other NPR styles. Games such as
Okami and Cel Damage have used it to good effect. See Figure 11.2.
There are a number of different approaches to toon rendering. For
models with textures and no lighting, a solid-fill cartoon style can be ap-
proximated by quantizing the textures [720]. For shading, the two most
common methods are to fill the polygonal areas with solid (unlit) color or
to use a two-tone approach, representing lit and shadowed areas. Solid
shading is trivial, and the two-tone approach, sometimes called hard shad-
ing, can be performed by remapping traditional lighting equation elements
to different color palettes. This approach is related to the lighting model
work by Gooch et al. [155, 423, 424] for NPR technical illustration. Also,
silhouettes are often rendered in a black color, which amplifies the cartoon
look. Silhouette finding and rendering is dealt with in the next section.

Get Real-Time Rendering, Third Edition, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.