More On Toon Shading

Tags: , , , ,

This follows on from my earlier Blender Toon Shading tutorial. I'm going to briefly discuss some situations that have come up for me a lot when making toon shaders: adapting exisiting materials, shiny metal, glass, and flat walls.

If you type "toon shader" into the Blenderkit search, you can find several other approaches to creating these kinds of materials.

Setup

I'll demonstrate this with three objects: this basket downloaded from Blenderkit, a metallic sphere, a glass monkey head, and some walls.

Here's the objects with standard shaders:

The basket material has a texture, normal map, and roughness map:

The glass material is just basic glass:

The metal material is just a Principled BDSF with the metallic set to max:

The wall is just the default Principled BDSF in blue:

These are very simple glass, metal, and shaders. This kind of glass shader doesn't look great in Evee, I'm sure there's ways around that if you want to make realistic glass but I don't, so! Moving on!

Using an existing shader

It's sometimes useful to input an existing shader into a toon shader. This is pretty similar to a standard toon shader, but with the input shader replacing the Diffuse BDSF. I took out the gradient, texture, and fuzziness from the toon shader in my earlier tutorial to simplify things. I've also tweaked some of the nodes to create more of the look I want.

So, here's the nodes for my "toon shader with input" node group:

And here's the adapted bamboo basket texture:

Note that I lowered the strength of the normal map, mixed in some grey to the roughness, and mixed in some flat colour to the base colour. This smooths out the surface texture. Which exact numbers look best depends on the material.

Plugging the "toon shader with input" node group into all three shaders we end up with this:

The basket looks good but the others need some work.

Glass

There's a couple of different approaches I use for glass:

For any (partially) transparent material in eevee, remember to set the opacity to Alpha Clip in the material tab.

Here's an example of a glowing window, using an emission shader:

Here's a purple/blue gradient mixed with a glossy shader to fake a mirrored surface (I probably should have used a toon shader but the glossy shader works fine):

But for this scene I'll use a material which is transparent except for highlights.

This creates a material with some parts completely transparent. If you want all of it to be at least a little bit opaque, set the black in the colour ramp to a dark grey.

Metal

Metal textures can work fine with some tweaking, but sometimes I just fake it with a mix of glossy and diffuse shaders:

Walls and other flat surfaces

Large flat surfaces can look strange in a toon shader, with big circles of light and shade. One way to deal with this is to smooth out the shading, while still matching the general colour scheme of the toon shader used for other materials.

To create a soft toon shader, just make a copy of the "toon shader with input" node group, and set the highlight (and if neccesary, shadow) colour ramps to "linear" instead of "constant":

Putting it all together

Here's the final render:

Tutorial: Making a Toon Shaded Background explains how I use these techniques to create a background.