Cel shading, also known as toon shading, is a non-photorealistic rendering technique that makes three-dimensional computer graphics appear flat and hand-drawn. Instead of smooth gradients, it uses discrete bands of color for shading, often combined with bold outlines, to mimic the style of comic books or cartoons. The name derives from cels (short for celluloid), the transparent acetate sheets used in traditional 2D animation. While the result looks simple, the process is complex and has become a staple in video games, animation, and more recently, AI-generated imagery.
The technique originated in the late 20th century as a way to bring the aesthetic of hand-drawn animation into the realm of 3D graphics. Early experiments in the 1980s and 1990s laid the groundwork, but it gained mainstream attention with the release of the Dreamcast game Jet Set Radio in 2000, which showcased a vibrant cel-shaded world. Since then, it has been used in countless games, films, and other media, and it has become a popular style in Generative AI image generation, where prompt writers invoke it to achieve a specific look.
Basic Process
The cel-shading process begins with a standard 3D model. The key difference from conventional rendering lies in the shading algorithm. Instead of calculating smooth lighting values per pixel, cel shading quantizes these values into a small number of discrete shades. This creates the characteristic "flat look," where shadows and highlights appear as blocks of color rather than smooth gradients. The number of shades can vary, but typically ranges from two to five, giving artists control over the level of detail.
This quantization is often performed in the fragment shader, where the lighting value is compared against thresholds. For example, a pixel might be rendered in full brightness if its light intensity exceeds a certain value, in a mid-tone if it falls within a range, and in shadow otherwise. This step is crucial for achieving the hand-drawn appearance.
Outlines
Outlines are a defining feature of cel shading. They can be created using several methods, each with its own trade-offs.
Wireframe Method
One popular method involves rendering the back-facing triangles of the model in black, slightly enlarged, to create a silhouette. This is done by inverting back-face culling and drawing the back faces with a slight offset, often by translating vertices along their normals. The result is a black outline that surrounds the object. Interior contour lines can also be generated by drawing the back faces in wireframe with slight translations. After the outline is drawn, back-face culling is restored, and the shading and textures are applied. The final image is composited using Z-buffering, ensuring the outline appears behind the object's front faces.
Edge-Detection Method
Another approach uses edge detection on the rendered image. After rendering the scene with flat shading, a post-processing pass detects edges based on depth or normal discontinuities and draws them as black lines. This method is often faster and can be applied to any scene, but it may produce less precise outlines than the wireframe method.
In Video Games
Cel shading has had a profound impact on video game aesthetics. Jet Set Radio, released for the Dreamcast in 2000, was a pioneer, drawing media attention for its vibrant, cel-shaded style. Its influence is still felt today. Other notable early adopters include Cel Damage (2001), The Legend of Zelda: The Wind Waker (2002), and Ōkami (2006).
Developers often choose cel shading for artistic reasons. Hideki Kamiya, director of Ōkami, wanted to create a world with the natural beauty of the Japanese countryside, and producer Atsushi Inaba noted that Clover Studios had "abandoned the realistic style" in favor of inspiration from traditional Japanese art. Cel shading can also serve practical purposes. Satoru Takizawa, a developer on The Wind Waker, explained that the style made puzzle mechanisms and objects easier to understand, whereas photorealistic graphics would have made information harder to convey.
Examples in Film and Animation
Cel shading has been used in numerous animated films, often to achieve a specific visual tone. Early examples include The Great Mouse Detective (1986), Oliver & Company (1988), and The Little Mermaid (1989), which used computer-generated imagery with cel shading to blend with traditional animation. Later films like The Lion King (1994), Tarzan (1999), and The Iron Giant (1999) also incorporated cel-shaded elements. The technique has been used in a wide range of productions, from FernGully: The Last Rainforest (1992) to Titan A.E. (2000), demonstrating its versatility.
In AI Image Generation
With the rise of Generative AI and Deep learning models, cel shading has become a popular style in AI-generated art. Models like Stable Diffusion and Midjourney can produce images with cel-shaded aesthetics when prompted with keywords such as "cel shade," "toon shading," "anime style," or "comic book style." These prompts often include additional descriptors like "flat colors," "bold outlines," and "hand-drawn look" to refine the output.
The technique is particularly effective in AI because it simplifies the rendering, making it easier for models to generate consistent results. The discrete shading bands reduce the complexity of lighting, and the outlines help define shapes, which can be beneficial for Neural network models that struggle with photorealistic details. Prompt writers often combine cel shading with other styles, such as "watercolor" or "ink painting," to create unique looks.
Notable Practitioners
Several artists and studios have become known for their cel-shaded work. In video games, Sega's Jet Set Radio and Nintendo's The Legend of Zelda: The Wind Waker are iconic examples. Clover Studios, led by Hideki Kamiya, pushed the style further with Ōkami. In film, studios like Disney and Pixar have used cel shading in various productions, and independent artists have embraced it for its expressive potential.
In the AI art community, many practitioners use cel shading to evoke nostalgia or to create stylized characters. The technique is often paired with Prompt engineering to achieve specific results, and it has become a staple in AI-generated anime and cartoon imagery.
Technical Considerations
Cel shading is not limited to a single algorithm. It can be implemented in real-time rendering using shaders, or in offline rendering with more complex techniques. The choice of shading bands, outline thickness, and color palette greatly affects the final look. Some implementations also add texture to simulate paper or other materials, enhancing the hand-drawn feel.
In AI models, cel shading is often learned from training data, and the model may not explicitly use the traditional algorithm. However, the visual characteristics are consistent, and the style can be controlled through Prompt engineering and model selection. As AI continues to evolve, cel shading remains a popular and versatile style.
Conclusion
Cel shading is a distinctive rendering technique that bridges the gap between 3D graphics and traditional animation. Its flat shading and bold outlines create a unique aesthetic that has been embraced by video games, films, and AI-generated art. Whether used for artistic expression or practical clarity, cel shading continues to be a relevant and influential style in the digital age.