Hey everyone, I’ve just finished creating a shader for Blender Internal that creates cell shading. I had followed some tutorials and while they were extremely useful, they didn’t include some of the features that I was looking for. I created this shader as an attempt to mimic the style of the show RWBY, where 3D models are shaded to look 2D. This node tree was inspired by these two tutorials I found which I combined and modified into one shader since they both took a slightly different approach
So, onto the nodes!
So this starts out as toon material with a size of 1 and the smooth set to zero. Then, by using the dot product of the object’s normal and the lamp’s vector, the shadows are simulated. This works fine in most cases however there are some times where there should be shadows but they aren’t there. This is why I mixed this map with the regular shader so the shadows are correct.
Moving onto the colour. The easiest way to do this is to use Vertex Paint because that way every object can have the same material and all that needs doing is changing the vertex paint of each object to the correct colour. A hue, saturation, value node is then used with a mix RGB node to darken the shadowed are using the output of the shadow group as the factor. The value node can be used to set the darkness.
Finally, there is the lamp section. This is the feature I wanted to see. other cell shaders I’ve seen aren’t affected by a lamp’s colour or strength. While this is a stylistic feature, I wanted to add the ability to achieve this. So I used the lamp’s colour as an overlay and the saturation as the factor; the more coloured the light is, the stronger the effect. So for the next image Ive connected the lamp section into the material output.
Next up is the anime outline. There are two ways this can be done, through geometry or through Freestyle. I went down the geometry route as that is what the creators of RWBY did. This is achieved by using a Solidify modifier with the following settings

Notice the Material Index Offset is set to 1. This is important. Now a second material is added to the object, which is a shadeless black material with the Geometry Node’s “Front/Back” output controlling the alpha. This means that only the edges are visible. Remember, this material must not be traceable and have it must have transparency applied