Cel shading is a method of rendering
a three dimensional model
so that it looks like a hand-drawn animation cel
, rather than a photorealistic
rendering. It does this by reducing the total number of color
s from smooth (phong
shaded, etc.) to a user-selected palette
, and accentuating the model's border
s and line
s. A good cel shading algorithm
's end product is an extremely
look, which is indistinguishable from a traditional artist
's work unless you know exactly what to look for.
Color range replacement is the key to cel shading, and making a palette with enough of the right colors will insure a good looking result. Before any cel shading is done, shader renders the entire scene using normal shading and taking the usual amount of processor time. Then the shader analyses the image with a user-defined table that lists ranges of color to replace with a single color. That is, any pixel between within a certain range of color, light to dark red for instance, is replaced with a pixel of a single color from the palette, say a medium red. In the end, all of the smooth fades and gradients that would make the image look "3D" are replaced with blocks of two or three shades, which make the entire scene look like it was colored by hand.
To achieve a real animated look, the borders of each region have to be made, too -- a cartoon without nice black borders would just look like blotches of color moving around on screen. Individual parts of the model (eyes, a shirt, a forty foot long tentacle, whatever) are selected by the artist as a group. The shader reads the group as a single unit, and places a black edge wherever that group touches another group or the background. Good cel shader plugins let you set the lines touching the background to be darker, thus giving the character better definition. Methods of edge detection other than grouping may be used, giving different looks to the final rendering. For instance, the renderer can put a border wherever a visible face touches a hidden face, guaranteeing borders on all visible faces.
Cel shading is an additional step of processing after usual rendering, and in the past has incurred too big a performance hit to do in real time. With the near-magical power of today's mainstream graphics hardware, that restriction no longer exists, and cel shaded video games will be hitting the market en masse very soon. Already released is Jet Grind Radio on the Dreamcast, and the new Legend of Zelda for the Gamecube will be cel shaded too. Scads of cel shaded games are planned for the xbox, including a new Dragon's Lair game, and a racing game featuring The Simpsons.
mblase says : You might cite the Transformers Energon and SD Gundam cartoons as non-game examples of the technology at work.