I'm using the Crystalspace 3d engine and was wondering how you could create a shader that has no ambient light.(Like "Zelda: The Windwaker") The engine uses XML files to handle shaders. I'm lost at where to start. The documentation barely covers it:
Cell shading is about limiting the amount of colors. We used to have 2 colors, 4 colors, 16 colors, 256 colors, 16 bit color, and now 32-bit color and higher.
To do toon shading or cell shading you need to create a shader that can find the outlines of the objects and enhance those outlines. Then you can shade based on a 1D texture that limits the amount of color variation between various colors. By using simply u,v calculations you can effectively shade just as a cartoon would.
It's actually quite simple and even moreso if you don't have to have the silhoutte enhanced. So you draw your 3D model just the same and you simply shade it differently.
For an example of what takes place fire up your favorite 32-bit color game and take a screenshot. Now go to your fav photo editor and reduce the number of colors in the image and turn dithering off. What you end up with is the same image but with less colors, yet you can still see most of the details. Hence - cartoon shading.
I'm going for this look:
Also, reducing the colors to 2, would make the image monochrome. I still want the color, but I want to make only 2 different types for how the shadows are cast:
1. There is a shadow, thus the surface covered is darker. (not completely black)
2. There is not a shadow, leave the surface alone.
You may want to have a look at the "Gooch" shader from the orange book.
That looks like a pretty good site. However, the gooch shader only does the dark outlines, which I will not be usiing in my game. This is more of a gradient shader with edge enhancement. http://3dshaders.com/shaders/Gooch.jpg