152. Non-Realistic Rendering


This sample shows how to implement stylized, non-photorealistic rendering techniques, such as cartoon shading, edge detection, and a pencil sketch effect.

Sample Overview

The sample provides three specialized rendering techniques.

  1. Toon shading displays models using a banded lighting technique. Rather than the usual smooth gradients from light to dark, it uses just three discrete levels of brightness, with sudden transitions where the object goes from light into shadow.
  2. Edge detection adds black lines around the silhouette of the model.
  3. The sketch postprocess adds a pencil stroke pattern over the top of the scene.

Many graphical effects can be achieved by combining these techniques in various ways. For instance, a cartoon effect is created by using the toon shading and edge detection together, or a pencil sketch effect by combining edge detection with the sketch postprocess.


If you found this sample helpful in any way, please comment and explain below. 

No comments:

Post a Comment