Cell shading , or toon shading , is a 3D rendering technique that gives images a cartoon-like appearance. It is characterized by strong black outlines and barely nuanced colors, like in traditional comics or cartoons. Cell shading is used in many video games, such as Jet Set Radio, XIII or Borderlands, to create an original and stylized atmosphere.
The principle of cell shading
Cell shading relies on two main effects: contour drawing and shadow thresholding.
The outline drawing
Outlining involves drawing a black line around 3D objects to make them stand out. There are several methods to achieve this effect, such as multipass, envelope or depth filter.
- Multi-pass consists of rendering the object twice: once with its normal color and once with a solid color (black or white). Then, we superimpose the two images by slightly shifting the second to create the outline.
- Enveloping involves creating a copy of the object slightly larger than the original and coloring it black or white. Then, we display the original object over the envelope to create the outline.
- The depth filter consists of using the depth map of the scene (which indicates the distance between the camera and each pixel) to detect sudden changes in depth. These changes correspond to the edges of the objects, which can then be colored black or white.
Shadow thresholding
Shadow thresholding involves replacing light gradients with distinct gray levels, like in comic books. There are also several methods to achieve this effect, such as using a 1D texture or a pixel shader.
- Using a 1D texture consists of creating a texture that contains the different shades of gray that you want to use. Then, we apply this texture to the object depending on its lighting. For example, if the object is lit at 50%, we apply the color located in the middle of the 1D texture.
- Using a pixel shader involves programming a function that calculates the color of each pixel based on its lighting. For example, if the object is illuminated at 50%, it is assigned a color that corresponds to a predefined threshold.
The advantages of cell shading
Cell shading has several advantages over realistic rendering:
- It allows you to create an original and recognizable graphic style, which stands out from other games.
- It allows you to give more expressiveness and personality to the characters, by exaggerating their facial expressions or their emotions.
- It saves graphic resources, using fewer textures or details.
- It allows you to hide certain visual defects, such as aliasing or clipping.
But to make the most of cell shading, you also need to have a good graphics card. Among the most reputable brands is AMD Radeon, which offers high-performance and affordable cards. The best AMD Radeon graphics cards are capable of handling cell shading brilliantly, offering high resolution, fast refresh rates and low power consumption.
The disadvantages of cell shading
Cell shading also has some disadvantages compared to realistic rendering:
- It may be perceived as too childish or too simplistic by some players, who prefer a more immersive or more faithful rendering.
- It can be difficult to adapt to certain game genres, such as horror games or historical games, which require a darker or more believable atmosphere.
- It can be difficult to master, as it requires good artistic sense and knowledge of 3D rendering techniques.
FAQs
What games use cell shading?
There are many games that use cell shading, such as Jet Set Radio, XIII, Borderlands, The Legend of Zelda: The Wind Waker, Okami, Dragon Ball Z: Budokai, Viewtiful Joe, etc.
How to do cell shading with Photoshop?
There are several tutorials that explain how to do cell shading with Photoshop, like this one: https://www.youtube.com/watch?v=4wz7n2f0l9g
What is the difference between cell shading and flat shading?
Flat shading is a 3D rendering technique which consists of giving each face of an object a uniform color, without taking into account lighting. Cell shading is a 3D rendering technique that involves giving each pixel of an object a color based on its lighting, but using distinct gray levels. Flat shading gives a more geometric and simplistic appearance to objects, while cell shading gives a more cartoonish and more stylized appearance.
What is the difference between cell shading and comic shading?
Comic shading is a 3D rendering technique that involves adding additional effects to images to make them look like comics, such as speech bubbles, onomamouseeia, boxes, etc. Cell shading is a 3D rendering technique that involves changing the color and contours of objects to make them look like cartoons. Comic shading can use cell shading as a base, but it can also use other rendering techniques.
What is the origin of the term cell shading?
The term cell shading comes from the English cel-shading, which refers to celluloids, the transparent sheets on which the characters and settings of traditional cartoons were drawn. These sheets were then superimposed on a background to create the final image. The term cel-shading was coined by Sega to refer to the technique used in the game Jet Set Radio.
Conclusion
Cell shading is a 3D rendering technique that allows you to create cartoon-looking images. It is based on contour drawing and shadow thresholding, which gives objects a cartoonish appearance. Cell shading is used in many video games to create an original and stylized atmosphere. To optimize the graphics performance of these games, it is recommended to install Vulkan Run Time , a software library that allows you to make the most of the capabilities of the graphics cards. Vulkan Run Time is compatible with most operating systems and gaming platforms. It has advantages and disadvantages compared to realistic rendering, and it requires good artistic sense and knowledge of 3D rendering techniques.