The Theory
What is it?
How it Works
Making a lighting
engine

The Coding
NeHe Tutorial
Resources
• More to come

Reader Input
E-mail
Guestbook
View Guestbook

Media
Okami
• More to Come

Links
Nehe gamedev
Cel shading project
Cel shading project 2
• More to come

 

WHow it Works...hat

 

When I first started researching cel-shading, I often came across articles riddled with technical jargon and complex terminology. In this article I'm going to explain in simple terms what cell shading is and how it works. Later, I'll introduce popular programs used to produce cell-shaded effects. After that you should be able to understand  the Making a Lighting Engine article which explains in great detail how to create a cel-shading lighting engine using OpenGL. 

Cel- shading is a term which refers to two general properties- The first, which I refer to as Cel- lighting, and the other, referred to as silhouette lining. I think the MSDN network described the two processes best :

'Cartoon Rendering' does not have a specific definition. It loosely refers to rendering objects in a non-photo realistic style similar to that found in cartoons and comic books. It is typified by simple shading using large blocks of monotone color, coupled with outlines around objects. In the scheme described here, rendering breaks down into two separate problems:

  1. Rendering the 'body' of the object in a style reminiscent of a cartoon, with extreme color banding. (Ironically, color banding is more usually an unwanted artefact; here we would like to exaggerate it.)
  2. Rendering the silhouette edges as thick black lines.

Look at your arm under a light. if you were to take a picture of it and examine it, you would see that the part of your arm closest to the light was the lightest skin color. A lighting engine would replicate this picture by lighting the top of your arm and gradually darkening the color of your skin as it moves away from the light. Now take a look at the following picture from neo-genesis evangelion.


 

It's humorous yes, but focus on the guy's shirt, and HIS arm. notice how his skin color doesn't gradually change from light to dark as it moves away from the light? neither does the color of his shirt. its a very sharp stark contrast. it moves from one shade into another. this is the "Color Banding" that Microsoft was talking about earlier. When programmers attempt to cell-shade a game, they are trying to replicate this effect. 

Also notice the streaks of yellow emanating from the impact site, and the stars around his head, these are examples of special effects that designers try to include in order to make their games more closely resemble  cartoons.

So, HOW does a Cel-lighting engine make rendered objects look like cartoons? well, this is really hard to explain without getting really technical, so I'll have to explain a few common Rendering terms. First off, you have to understand that when drawing in a graphics library like OpenGL, the objects drawn have no inherent color or image. everything is drawn white by default. objects can be drawn various colors (Like blue, green etc.) but usually artists don't want to draw things like a blue box, they want to draw a box that LOOKS like something in real life, like a crate. Artists do this with something called a Texture, which is usually a bitmap image that resembles some kind of surface. This image is then stretched over the object to make the surface appear to have that images' texture. Here's an example below-

 

A pyramid and Cube with basic coloring

 

A bitmap Texture

 

A basic Cube, with the above bitmap texture wrapped around it

Now, when creating a cel-lighting engine, Designers use a special kind of texture, Called a one-dimensional Texture.

Next Page of "How it Works">>

Home

Mail me- jaw048000@utdallas.edu