Project Maiko: Toon Shader Blending

Experimenting with blending multiple toon shaders by introducing noise into their size and smooth sockets. The result is a slight painterly effect similar to what you would get if digital painting in Photoshop.

 The noise breaks up the banding effect caused by multiple toon shaders, and removes the precise, harsh edges of shadows while still maintaining a toon style.

The noise breaks up the banding effect caused by multiple toon shaders, and removes the precise, harsh edges of shadows while still maintaining a toon style.

1,000 Samples, and 5/3 light bounces, which produce some of the soft edges. Key light is a hard point, fill is a large mesh square. Fresnel is being used to factor between diffuse and gloss, and the metal has anisotropy mixed with the gloss.

Update

Here are the nodes. It's too much to fit into one image and have it still be readable, so I've broken it down. Some nodes are included multiple times to keep it easy to understand what's happening. Click for full size images.

Two toon diffuse nodes are used. Each gets a different noise texture for Size and Smooth. Each noise texture has a separate mapping node so that they can be rotated to not have their patterns match (this could also be achieved by giving them different sizes or levels of detail.)

Color, and noise scale is controlled through the group input. Math is done on each noise texture to limit it to a certain range of size to keep a gap between the toon edges. A curve is used for the Smooth to make its variation less linear, but this is not essential. Finally, they are mixed based on a 5th noise factor for even more variety.

The gloss section is the same, but can have different mapping values and different ranges for Size and Smooth. Also, as highlights are much smaller areas, the frequency of the noise must be higher to be visible, so the incoming noise scale is multiplied. The gloss nodes are also left pure white, rather than taking the group color. I did it this way to keep the highlights visible, but different styles could call for different gloss colors.

ToonBlendFresnelMix.png

Lastly, the Diffuse and Gloss are simply mixed with Fresnel, based on an appropriate Index of Refraction. Do not use just a plain factor if you want good results. You can find lists of IORs for many materials online.

More variety can be added, and more controls pulled to the node group. Subtle HSV shifts, different noise sizes, and more patterns of noise could be added, depending on the material, and desired final style. You could also add more nodes for different materials. For example, the shiny metal in the above images has had an Anisotropy node mixed with the Gloss frame's output at a factor of .5.

This method seems promising, but it will take more to achieve a full paint style. I will continue to experiment.