Page 1 of 1

Cell Shading

Posted: Sat Mar 04, 2006 10:26 pm
by Zamaster
What exactly is cell shading? I know what it looks like, but what exactly IS it?

Posted: Sat Mar 04, 2006 10:48 pm
by rdc

Posted: Sun Mar 05, 2006 12:49 pm
by Zamaster
Thanks but I said I know what it looks like. Im just curious to know what you're actually doing to the 3D model. Im not looking for the formula or anything. I know about Cartoon chading which is something like modifying the light properties of an object such as specular and diffuse. Im just wondering why cell shaing requires alot of "processor power" when you can aquire the same effects with simpelr methods. What exactly goes on in "cell shading" that makes it so fancy shmancy.

Posted: Sun Mar 05, 2006 2:44 pm
by Pete
Cell shading makes 3D models look like they are hand-drawn cartoons by drawing thick black lines around the edges of the model, and putting very simple two-shade shadows on models (like the ones they use in cartoon shadows).

Jet Grind Radio for Dreamcast was the first game to use it... you can see a lot of screenshots here:
http://media.dreamcast.ign.com/media/01 ... mgs_1.html

Check out this before/after picture of the main character from Jet Grind Radio:

Image

Image



Some other good examples are:
Zelda: The Wind Waker (Gamecube)
Auto Modellista (a racing game for PS2)
XIII (first person shooter for PS2)
Viewtiful Joe (fighting/action game for Gamecube / PS2)

Image

Image

Posted: Sun Mar 05, 2006 5:40 pm
by The Awakened
All it looks like you do is check whether each colour in the original model is above or below a certain colour intensity. Let's take the above guy from Jet Grind Radio. His shirt is yellow. If the yellow is above a certain intensity, the cel shaded version is the brighter yellow, and if the yellow is below a certain intensity, it's shaded the darker colour. That can probably be done in one pass as you calculate the light intensity.

Then you have to draw the black lines, which doesn't exactly seem to be easy.

Ask Syn9. He's doing one of his Zero-G games with cel-shading.

Posted: Sun Mar 05, 2006 6:04 pm
by Zamaster
I know how the outline is done. A second object is created, slightly larger than the first. It is linked to the original object and uses reverse culling. So you see the inside and not the outside. This creates an outline of the chraracter which moves with it.

Posted: Mon Mar 06, 2006 7:21 pm
by syn9
correction, i'm not using cell shading >) i'm not sure how anyone got that impression. it might just look like that because of how high contrast the colors come out

Image

there is a tutorial on creating a cell shading effect on NeHe at

http://nehe.gamedev.net/data/lessons/le ... ?lesson=37

I've never tried to reproduce the effect though so i cannot vouch for the quality of the tutorial

edit:
i saw the note about zgtr being cel shaded in qb express #18, i'll email pete about that.

Posted: Wed Mar 08, 2006 9:11 pm
by The Awakened
My mistake. :) I only saw the screenshots in passing.