While still toying around with different story ideas, I’ve spent some time on improving my toon/cel shading techniques. At first they may look awfully clumsy and complicated because it’s a rather simple thing to get a toon shaded image from just about any 3D renderer, nowadays. Even pretty “ink” outlines are no longer the problem they used to be.
Yet the technique I’m developing gives the artist (in this case me!) a lot more control over the look and, best of all, even major changes can easily be applied long after the 3D render-farm has gone to sleep. Being able to setup things like color, contrast, line thickness and even lighting in post can be a huge advantage when you think of the alternative: Time consuming re-rendering!
Ink outlines
I’ll start out by showing you how I produce outlines around objects, much like they appear in just about any traditional 2D animated work. Sadly, most 3D programs don’t come with a “Make cool toon outlines” button (contrary to what many beginners seem to think, judging by the plethora of questions regarding the topic on various CG forums), so there is a lot of trickery going on to achieve decent results. To be honest I think hand-painted lines will always have the advantage in looks here.
The way I do it isn’t exactly new and has been published more than once, so I won’t be going into much detail. As you can see below, I’ve had 3Delight render me an image of the scene showing the directions the normals of the surfaces are pointing. Feeding this image to an edge detection filter in a post-processing applicaton like AE or PS will result in more or less decent outlines — some cleaning up and fiddling with the settings is required before anything useful will come up, though.
Cel shading in post
The more clever part is getting the cel-shading onto the objects! For this I used two more images, one rendered with only a single directional light source and lambert shaded objects, and an additional image in which I tagged all objects with IDs, according to which “material” they’d belong to. For simplicities sake I chose to test it on two sets of spheres.
Using this second image to mask the first, one receives an image depicting all objects that share material A, while objects sharing material B have been masked out. What’s left to do now is a matter of remapping the color ranges to create the illusion of cel-shaded objects. Several plug-ins are capable of doing this, but for this test I worked with the “Gradient map” feature in Photoshop.
Putting it together
You may have guessed it… multplying the outlines with the cel-shaded objects results in a nice cartoon style picture, but with the added advantage of being able to make adjustments whenever they may become necessary. An obvious problem is that you are limited to only a certain amount of colors on cel-shaded objects, because anything over, say, twenty shades will become unmanageable. Which, on the other hand, may turn out to be a plus: Tradional animation is also limited to a certain number of colors per character…