ArticleslgStudy

computer science

Cel shading

Cel shading is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Cel shading rather than just read about it. In short: Cel shading or toon shading is a type of non-photorealistic rendering designed to make 3D computer graphics appear to be flat and hand-drawn by using shade gradient or tints and shades instead of shading colors. A cel shader is often used to mimic the style of a comic book or a cartoon and/or give the render a characteristic paper-like texture.

Cel shading — main illustration
Cel shading — illustration

Key takeaways

  • Cel shading belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Cel shading to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Cel shading from memory before moving on to harder problems.

Reference excerpt

Cel shading or toon shading is a type of non-photorealistic rendering designed to make 3D computer graphics appear to be flat and hand-drawn by using shade gradient or tints and shades instead of shading colors. A cel shader is often used to mimic the style of a comic book or a cartoon and/or give the render a characteristic paper-like texture. There are similar techniques that can make an image look like a sketch, an oil painting or an ink painting. Though the end result of cel-shading has a very simplistic feel like that of hand-drawn animation, the process is complex. The name comes from cels (short for celluloid), clear sheets of acetate which are painted on for use in traditional 2D animation.

Basic process

The cel-shading process starts with a typical 3D model. Where cel-shading differs from conventional rendering is in its non-photorealistic shading algorithm. Conventional smooth lighting values are calculated for each pixel and then quantized to a small number of discrete shades to create the characteristic "flat look", where the shadows and highlights appear as blocks of color rather than being smoothly mixed in a gradient.

Outlines

Wireframe method Black ink outlines and contour lines can be created using a variety of methods. One popular method is to first render a black outline, slightly larger than the object itself. Back-face culling is inverted and the back-facing triangles are drawn in black. To dilate the silhouette, these back-faces may be drawn in wireframe multiple times with slight changes in translation. Alternatively, back-faces may be rendered solid-filled, with their vertices translated along their vertex normals in a vertex shader. After drawing the outline, back-face culling is set back to normal to draw the shading and optional textures of the object. Finally, the image is composited via Z-buffering, as the back-faces always lie deeper in the scene than the front-faces. The result is that the object is drawn with a black outline and interior contour lines. The term "cel-shading" is popularly used to refer to the application of this "ink" outlining process in animation and games, although originally the term referred to the flat shading technique regardless of whether the outline was applied. The Utah teapot rendered using cel shading:

The back faces are drawn with thick lines The object faces are drawn using a single color Shading is applied Steps 2 and 3 can be combined using multitexturing (part of texture mapping).

Edge-detection method

In video games

The Dreamcast game Jet Set Radio, revealed at the 1999 Tokyo Game Show, drew media attention for its cel-shaded style. It used cel-shading for its characters and its vibrant visual style has had a lasting influence on the use of cel-shading in video games. Since the early 2000s, many notable video games have made use of this style, such as Cel Damage (2001), The Legend of Zelda: The Wind Waker (2002) and Ōkami (2006). Cel shading, in contrast to other visual styles such as photorealism, is often used to lend a more artistic or fantastical element to a video game's environment. In developing Ōkami, director Hideki Kamiya described his vision for the game's graphics: "I wanted to create a game with the natural beauty of the Japanese countryside... to make a world that was glistening and beautiful." Producer Atsushi Inaba recalls in a 2004 interview that Clover Studios had "abandoned the realistic style" for Ōkami as they became inspired by traditional Japanese art. Game studios might choose a style such as cel shading in their development for reasons beyond artistic vision. Cel shaded graphics are usually simple in visual information, which can be useful in some applications. In the case of The Legend of Zelda: The Wind Waker, developer Satoru Takizawa states that using this style allowed to "represent the mechanisms and objects for puzzles [in The Wind Waker] in a more easy-to-understand way." Takizawa also argues that photorealistic graphics, in contrast, would have "had the adverse effect of making information difficult to represent game-wise."

Examples of cel-shading in media

… excerpt ends here. Continue reading the full article.

Illustrations

Cel shading: A 3D model of a spacesuit (left) edited to use a basic cel shader, also known as a toon shader, and border detection (right)
A 3D model of a spacesuit (left) edited to use a basic cel shader, also known as a toon shader, and border detection (right)
Cel shading: Graphics complex of a seashell with toon shading modeled in Mathematica 13.1
Graphics complex of a seashell with toon shading modeled in Mathematica 13.1
Cel shading: Cel-shaded rendering of two isosurfaces of the probability density of a particle in a box
Cel-shaded rendering of two isosurfaces of the probability density of a particle in a box
Cel shading illustration
Cel shading illustration

Worked examples

Example 1 — a first encounter with Cel shading

Start with the simplest possible case. Write down what Cel shading claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Cel shading before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Cel shading ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Cel shading

In research
Cel shading appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Cel shading in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Cel shading is common in secondary-school and first-year university syllabi. It links to neighbouring topics Animation techniques, Cel-shaded animation, Computer animation, so understanding it makes those chapters shorter.
In everyday life
Look for Cel shading outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Cel shading” →

How to study Cel shading in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Cel shading means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Cel shading out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Cel shading in simple terms?

Cel shading or toon shading is a type of non-photorealistic rendering designed to make 3D computer graphics appear to be flat and hand-drawn by using shade gradient or tints and shades instead of shading colors. A cel shader is often used to mimic the style of a comic book or a cartoon and/or give…

Why does Cel shading matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Cel shading?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Cel shading.

Tags

  • Animation techniques
  • Cel-shaded animation
  • Computer animation
  • Shading

Keep exploring