Engine & tech
Toon shading
Also: cel shading, non-photorealistic rendering
Toon shading, also called cel shading, is a rendering technique that splits lighting into a few hard colour bands instead of smooth gradients, often combined with dark outlines. It makes 3D models look like flat-coloured drawings.
Background
The name refers to the celluloid sheets of traditional animation, on which characters were painted in flat colour. Games have used the technique in real time since around 2000, and it belongs to the wider field of non-photorealistic rendering.
Technically, light intensity is mapped through a step function or colour ramp onto just a few values. Outlines can be done in several ways: edge detection in screen space, lines computed from geometry, or the inverted hull method, where a slightly enlarged, inside-out copy of the model sits dark behind the original.
Typical mistakes are too many bands, which blurs the cartoon look, grey shadows that make the image dull, and outlines that flicker or turn too thick when the character is scaled down.
How we do it
Our Blender characters use toon materials. In toni.py and figuren.py a colour ramp with constant interpolation produces two bands, and the shadow is not grey but a warmer, darker shade of the base colour. The dark outline comes from an inverted hull. The script header sums up the style as cartoony, crooked, flat colours, toon steps.
For Persona non grata we rendered several character styles side by side before committing, among them toon, outline, soft and pixel.
Related terms
- Sprite sheetEngine & techA sprite sheet is a single image holding every frame of a character or animation in a grid, plus a description of the sequences.
- Style testProduction & AI toolsAn early, cheap test of an art style on a real scene, before the whole game is produced in that style.
- Asset pipelineProduction & AI toolsThe fixed chain of tools that turns raw material such as 3D models or AI images into finished, validated game files.
- Generative backgroundsProduction & AI toolsGame backgrounds produced by an image model from a text prompt and a reference image, then cropped and prepared for the game.