Toon Material (Simple)
By Neil Blevins
Created On: Mar 17th 2001
Updated On: Dec 6th 2024
Software: Blender or 3dsmax (scanline)

There are many advanced toon shaders out there for 3d software, but sometimes you just need a simple fake. Here's a tutorial on how to create a simple toon material.

Software Agnostic Material

The basic ingredients are as follows:

Blender Example

Here's the shader for Blender...


First notice this doesn't contain a Principles BSDF, instead we're hooking the color directly into the Surface of the Material Output. Then we use a Diffuse BSDF node to capture the lighting in the scene, hook that into a Shader to RGB node to convert the shaded values into rgb values, then use that inside of a Color Ramp to control the colors.

In the Color Ramp, instead of a single color, choose whichever colors you want painted on the interior of your surface. Then set the value to "Constant" so you don't get a smooth gradient, instead you snap between the colors you've chosen. Move the tags in the gradient to get the values placed on the surface any way you'd like.

To do the outline, use a Layer Weight node that will capture the edges of your surface (sometimes refered to as a Facing Ratio), set Blend to 0.8, hook this into another Color Ramp, and adjust the color ramp's gradient to create a sharp black outline at the edge. Then take the edge nodes and the painted surface nodes and mix them together with a Mix node, using the outline as a mask to reveal the color Black that's in the Mix node. Hook the mix into your Material Output.

Here's the resulting render.


Here's the blend file, Blender 4.2: toon_simple_3dsmax_blender.zip

3dsmax (scanline) Example

To do this inside of 3dsmax, we'll use the Falloff Map. A falloff map is basically a way to vary a color on a surface based on a series of functions. One such function is called Perpendicular / Parallel, which blends between two colors based on the surface normal direction, so edges of an object can be a different color then the front. Another function is Shadow / Light that lets you change color between the dark and lit part of your material. Using these maps, and layering them together using mix, you can make a color layer that's based on Shadow / Light, a highlight layer based on the same thing, and an inked edge based on Perpendicular / Parallel.


The key is to adjust the output graph on your Falloff, making the transition between colors very sharp, to get that hard edge transition between bands of color.

A similar output trick is used to get a sharp edge, and a sharp highlight.

Also note the material is 100% self illuminated, so that you get the pure color with no diffuse shading.


For complete details on how the material works, please check the file.

Here's the max file, 3dsmax 2022: toon_simple_3dsmax_scanline.zip

Conslusion

Please note that a real toon shader can do a lot of things that this method cannot, especially when it comes to inking. A toon renderer has true edge detection, as opposed to just a color change based on normal direction, which gives it a lot more options. For example, it can tell if an object intersects itself, changing the color of the edge based on self intersection. A true toon renderer will also give you better and more consistent results, especially when animating. However, I have found materials such as this one useful in the past, and figured I'd pass it along.



This site is ©2024 by Neil Blevins, All rights are reserved.
NeilBlevins.com TwitterMastodonBlueskyInstagramCaraBloggerFacebookLinkedInArtStationKickstarterGumroadYouTubeIMDB