Cel Shading - Process

Process

The cel-shading process starts with a typical 3D model. Where cel-shading differs from conventional rendering is in its use of non-photorealistic lighting. Conventional (smooth) lighting values are calculated for each pixel and then mapped to a small number of discrete shades to create the characteristic flat look – where the shadows and highlights appear more like blocks of color rather than mixed in a smooth way.

Black "ink" outlines and contour lines can be created using a variety of methods. One popular method is to first render a black outline, slightly larger than the object itself. Backface culling is inverted and the back-facing triangles are drawn in black. To dilate the silhouette, these back faces may be drawn in wireframe multiple times with slight changes in translation. Alternatively, back-faces may be rendered solid-filled, with their vertices translated along their vertex normals in a vertex shader. After drawing the outline, back-face culling is set back to normal to draw the shading and optional textures of the object. Finally, the image is composited via Z-buffering, as the back-faces always lie deeper in the scene than the front-faces. The result is that the object is drawn with a black outline and interior contour lines. Popularly, this "ink" outline applied to animation and games is what’s called cel shading, while originally the term referred to the shading technique, regardless of whether outline is being applied or not.

The Utah teapot rendered using cel-shading:

  1. The back faces are drawn with thick lines
  2. The object is drawn with a basic texture
  3. Shading

Steps 2 and 3 can be combined using multi-texturing (see texture mapping).

Another outlining technique is to use 2D image-processing. First, the scene is rendered (with cel-shading) to a screen-sized color texture:

Then, the scene's depth and world-space surface normal information are rendered to screen-sized textures:

A Sobel filter or similar edge-detection filter is applied to the normal/depth textures to generate an edge texture. Texels on detected edges are black, while all other texels are white:

Finally, the edge texture and the color texture are composited to produce the final rendered image:

Read more about this topic:  Cel Shading

Famous quotes containing the word process:

    The American, if he has a spark of national feeling, will be humiliated by the very prospect of a foreigner’s visit to Congress—these, for the most part, illiterate hacks whose fancy vests are spotted with gravy, and whose speeches, hypocritical, unctuous, and slovenly, are spotted also with the gravy of political patronage, these persons are a reflection on the democratic process rather than of it; they expose it in its process rather than of it; they expose it in its underwear.
    Mary McCarthy (1912–1989)

    The a priori method is distinguished for its comfortable conclusions. It is the nature of the process to adopt whatever belief we are inclined to, and there are certain flatteries to the vanity of man which we all believe by nature, until we are awakened from our pleasing dream by rough facts.
    Charles Sanders Peirce (1839–1914)

    A process in the weather of the world
    Turns ghost to ghost; each mothered child
    Sits in their double shade.
    A process blows the moon into the sun,
    Pulls down the shabby curtains of the skin;
    And the heart gives up its dead.
    Dylan Thomas (1914–1953)