Exaggerated Shading for Depicting Shape and Detail

The second paper I’ve read for my thesis about Non-Photorealistic Rendering is Exaggerated Shading for Depicting Shape and Detail by Szymon Rusinkiewicz, Michael Burns and Doug DeCarlo. Much like last paper, NPR is applied to bring out more detail/shape suggestion in a given model.

The paper starts with summing up the key rules in depicting shaded relief, lended from hand-shaded terrain cartographers:

1. Shadows and specular reflections should be omitted.
2. Lighting should appear to originate from the top of the image.
3. Direction of the light should be locally adjusted.
4. Height should be exaggerated
5. Sharp contrast at ridges (a ‘hard’ transition between light and dark)
6. A suggestion is made to use multiple versions of the geometry (more and more smoothed) and blend the shading results into the final picture.

The method which is suggested in the paper also adopts a principle of toon shading, so the results are pushed towards light and dark. The basic formula becomes:

(1/2).(1/2).clamp [a.(n.l)]

Where n is the normal vector, l is the light vector, a is a user-specified exaggeration parameter, and the clamp function clamps between -1 and 1.

This is evaluated for multiple scales, with each scale using smoother geometry. The original geometry is smoothed in every step by computing a weighted average at every vertex of the nearby normal.

An extension to arbitrary 3D geometry (I suppose all the following only was valid for reliefs) is necessary: parts of the geometry facing or turned away from the light suffer from loss of detail due to the clamping.

This is where the local lighting comes in. It is adjusted per vertex and per scale. The light vector is projected on the plane perpendicular to the next smoothed normal (that’s the normal from the next scaling step). This light direction is then used in the clamp function.

Using this extension to the original algorithm, arbitrary 3D geometry can be lighted with exaggerated shading.

Another extension is introduced, to adjust the light source like in the previous extension, but now usin gthe principal direction. Results of this extension are only visible on detailed maps, and the effect is not too spectacular on regular 3d objects, so I’ll not review the algorithm here.

More interesting is the so-called attention-based modulation of detail. Because the whole algorithm relies on several (pre-computed) “smoothed” versions of the geometry, one could alter these smoothed versions so more exagerrated detail is visible in only certain regions. This can be used to draw the viewers focus to certain regions in the render. (For example a render of a statue, but the most detailed shading is in the face)

It’s also interesting to note that the existing algorithm is implemented in interactive applications: it can run at 30 fps in software mode on a Pentium 4 (rendering the well-known bunny model), and even more (90 fps) on a newer video card using vertex shading. Note that the time for pre-computing the normals is not included.