Advanced Toon Shader V1.2 (Allows Coloured Lights) - Blender Eevee 4.1+
Advanced Toon Shader v1.1
This is version 1.1 of my Advanced Toon Shader. It allows you to control certain parameters to change the look of your toon material. You can also use coloured lights and they will react to the model accurately.
This method will only work in Blender 2.93 and onwards, as that is when lights were given separate components for Diffuse and Specular.
Version 1.1 Changelog:
- Changed internal settings which allow for softer shadows/highlights/fresnel
- Added a separate colour for the Fresnel
- Added the Fresnel Coloured Light Influence control, which allows for colouring of only the fresnel
Documentation
When you first open the attached Blender file, you’ll see Suzanne and two Spheres. Suzanne is just using a default blue colour, one of the spheres has a texture and the second sphere is using the Hair shader. They all have Solidify modifiers that are giving them the black outline. The outline is created by using the solidify modifier to expand the mesh, and then flipping the normals. Then by using a Backface Culling material, the black outline will only show up on the back faces of the mesh, which produces the outline. (If you’re recreating this yourself, make sure to set the Shadow mode to None, otherwise it will cause strange shadows)
There are three different materials, one is the default shader, another has a texture attached to show you how to use textures with the toon shader, and the final one is a hair shader which allows you to create toon style highlights on hair.
The Toon Shader has a number of different parameters and they can used in different ways to create different types of materials.
Base Colour
- This is the base colour of the material and essentially the midtone colour. When using textures, you want to plug in the texture directly to this node
Shadow Colour
- This is the shadow colour of the material. You can change it to a darker version of the base colour, or if using textures, pass the texture through a Multiply node to darken the colour of the texture.
Highlight Colour
- This is the highlight colour of the material. You can change it to a lighter version of the base colour, or if using textures, pass the texture through a Screen or Overlay node to lighten the colour of the texture.
Fresnel Colour
- This is the colour of the edge lighting. You can change this to any colour in version 1.1
Shadow Threshold
- The shadow threshold controls how much of the model will be in shadow. Setting this to 0 will get rid of shadows, and setting it to 1 will make everything be in shadow. This value will change for every model depending on where you want the shadows to be.
Shadow Hardness
- This will control how sharp the shadows are. Setting it to 1 will give you perfectly sharp shadows, and setting it to 0 will give you softer shadows.
Highlight Threshold
- The highlight threshold controls how much of the model will have bright highlights. Setting this to 0 will get rid of highlights, and setting it to 1 will make everything be highlighted. This value will also change for every model depending on where you want the highlights to be.
Highlight Hardness
- This will control how sharp the highlights are. Setting it to 1 will give you perfectly sharp highlights, and setting it to 0 will give you softer highlights.
Coloured Light Influence
This controls how much colour you want this material to receive from the coloured lights. Setting it to 0 will turn off the coloured lights, and setting it to 1 will give it the full colour of the lights.
Fresnel Threshold
This controls the rim light of the material. It won’t appear in shadowed areas. Setting this to 0 will give no rim light, and setting it to 1 will give a thick rim light.
Fresnel Hardness
This will control how sharp the rim light is. Setting it to 1 will make the rim light sharp and 0 will make it softer.
Fresnel Coloured Light Influence
This controls how much control the Fresnel will receive from your lights. Having this as a separate control can allow you to add a rim light that is affected by lights in your scene but the rest of the model will stay the normal colour.
If you want to add the Node group to any existing/new materials, then you can find the nodes underneath the Group option in the Add Shader menu