Four Different Methods for Making Cel-Shaders in Blender Eevee (2.8, 2.9+)

Joseph Hansen
7 min readOct 4, 2020

--

One of the biggest struggles (and also one of the most enjoyable aspects) of working with stylized/NPR art is creating cel/cartoon shaders. Simply put, cel shaders divide lighting into distinct base tones and shadows with clean, sharp lines between. (They can utilize mid-tones as well; you’ll notice that the examples above have three distinct divisions.)

Crucial to anime, cartoons, comic book style, and any other styles, cel-shading is also surprisingly varied in ways it can be created and used. Below are four methods you can use in Blender- complete with pros, cons, and node setups.

#1: Pure Generative Process (PGP)

  • Pros: easy to set up, allows for very specific palettes/highly stylized art
  • Cons: detrimental to detail level, precision, and texture
Female test model with PGP

The PGP method is by far the simplest to create; and as such, it’s what you’ll usually find in “how to make a cel shader in Blender” tutorials. Unfortunately, it’s also useless in many contexts.

A PGP cel shader converts every color on the shaded object to one of a set number of colors (usually 2, sometimes 3.) If you were to use a Shadow (s) color and a Base color (b), for instance, every pixel (n) would follow this formula:

n = s or b

Practically speaking, you can use this to lock all colors in an image to a palette or have shadow colors that are completely different (and non-realistic) from the base colors. For example, take this simple sphere, shaded with the PGP method.

The node setup of this is as follows:

By changing the colors baked into the color ramp, we can quickly and drastically affect the appearance of the sphere.

The first problem here is that this is no way representative of real light. The luminance of the shadows, highlights, and base colors are completely lost with this method, meaning any luminance has to come from the contrast between the colors on the ramp. In the example above, the Value of the two colors is the same, so the green is not a “shadow”, it’s just a different tint of the same color. You could even have a “shadow” with a higher value than the base color with this setup.

The second problem you can see very clearly in the example image: this method completely obliterates any detail from image textures or any other texture. The hair on the female test model has no detail at all; it’s all been lost to the merciless jaws of the PGP method. As such, I recommend using this method with caution.

#2: Emissive Strength Process (ESP)

  • Pros: easy to set up, high contrast, good for stark highlights
  • Cons: sucks out saturation, doesn’t work well with Bloom
Female test model with ESP (go ahead, make a pun)

The Emissive Strength Process is unique. It’s not useful across the board, but in the right circumstances or situation, it’s invaluable. Much like PGP, it’s good for niche uses, but unlike PGP, it doesn’t remove detail.

An ESP shader converts each color on the shaded object to a value, that in turn determines the strength of an Emission shader. Using again a shadow (s) value and base (b) value, each pixel (n) follows the formula:

emission strength of n= s or b

The node setup is below:

This node collection has a few additions from the PGP method; first of all, an image texture is used to determine the color of the Emission. Again, the PGP method doesn’t allow for image textures. There is also a Separate HSV node. You could forgo that and just ColorRamp the overall color, but using the value specifically allows for more precise shadows.

The downside to this method is the gray pallor that everything takes. The darker your shadows, the more gray and unappetizing everything becomes. As such, this works extremely well for low saturation colors or grayscale. It can also be used to lend an unhealthy or dead air to a person. Having deathly gray shadows may not work on someone you want to look good, but it is a nice effect when you want someone to look decidedly not good.

#3: Direct Shadow Overlay (DSO)

  • Pros: very precise, very customizable, maintains color on shadows, works very well with SSS
  • Cons: the glow on boundaries may not work for the style
That’s nice :)

All right, my chili babies, we’ve made it to the two overlay methods! Both of these are far more usable generally than either of the process methods.

The theory behind the DSO is simple. Each pixel on the shaded object has a color equal to the result of color mixing (mixRGB > Multiply). The value of the pixel, sent through a Color Ramp, is the factor. One input of the mixRGB is the texture color (or whatever the base color is), and the other is the shaded texture color. In other words, the base color gets multiplied by the shaded color based on a value from the Color Ramp.

Honestly, it’s a lot easier to look at it in node form, so here’s the setup:

Again, the Separate HSV node comes into play. Note that it’s inverted (subtracted from 1); this makes it easier to use the Color Ramp as shadows are still on the left.

This method works remarkably well with hair, skin, and fabric: it draws out undertones by maintaining color in the shadows and adds a very subtle “glow” on the boundaries between shadows and highlights. That adds an organic/sub-surface scattering look to the result. Shading this way is also very detailed; look at the edges on the metal example and compare it to the process metals:

DSO (left), ESP (right)

Notice also how much more color the shadow has on the DSO. The ESP could be used for a more glossy look than the DSO provides, though; again, DSO is best for an organic look.

#4: Comparative Value Overlay (CVO)

  • Pros: extremely versatile, customizable, and looks good all the time
  • Cons: the most memory intensive and slowest to render of any of the four, not easy to set up/customize unless you understand the theory behind it

CVO is the most precise of any of the four:

CVO (left), DSO (middle), ESP (right)

It also adds color to shadows without having the SSS glow of the DSO method, so it allows for even sharper boundaries where that is called for stylistically. I feel that it doesn’t look quite right on metal or highly glossy surfaces, which I would consider the only major downside. The upside is that you aren’t limited to just one method in a project; generally, I use DSO for metals/glossy materials and CVO for everything else.

Another huge benefit of this method is that it takes care of the luminance problem automatically. You don’t have to worry about getting the value of shadows right for the color, because that is calculated by the subtraction. You do have to worry about that problem otherwise: the human eye can see more shades of green than any other, and so the value of shadow you use for green shouldn’t be the same as the value you’d use for a red or blue in the same lighting. It’s more complicated than that, but ultimately, CVO takes care of it.

The theory is like this: by subtracting the base colors from the shaded colors, we can find exactly what the difference is between them. This difference is used as a factor, after being run through a Color Ramp, to mix the base color with a darkened version thereof. Because this difference is usually small, a lot of space can be wasted on the Color Ramp; this can be fixed by multiplying the subtracted value by a large number.

If that sounds somewhat similar to the DSO method, it is! This is really just an expanded and improved form of the DSO. I used the DSO method exclusively for a long time before figuring out that I could make it better. Anyway, I don’t have a node setup for you readers on this one. Sorry! The problem with CVO is that without a lot of added parameters and nodes, it’s hard to customize it and get it optimized. What I do have is a file download that you are welcome to experiment with and use for any situation, commercial or non-commercial.

I hope this was helpful information! Please feel free to download that file and use it, and show me your cel-shaded work on Twitter! :)

blendernomy.com

--

--