Toon Shading Models, Stylized Rendering Experiments

My previous approach was not that great, but I found a way to remove self-shadows while keeping the light color influence as well as a shadow on the ground, all on one light channel. The downside of this is of course that no shadows effect the toon mesh anymore, so it is best used with point lights only or in combination with some sort of trace manager that checks for sunlight.

(Point lights only, cast shadows, channel 0, no directional light, toon offset 0.5):
celstatue2

Lowering the subdermal color can create a more shadow-y style, and tweaking roughness and toon specular also looks pretty good with this tweak, in my opinion:

In DeferredLightingCommon.ush, line 351 (4.27 branch):

// Only get shadow terms if not toon shader
BRANCH
if (!( GBuffer.ShadingModelID == SHADINGMODELID_TOON || GBuffer.ShadingModelID == SHADINGMODELID_TOON_SKIN || GBuffer.ShadingModelID == SHADINGMODELID_TOON_ANISO || GBuffer.ShadingModelID == SHADINGMODELID_TOON_HAIR)) {

		GetShadowTerms(GBuffer, LightData, WorldPosition, L, LightAttenuation, Dither, Shadow);
		SurfaceShadow = Shadow.SurfaceShadow;
		LightAccumulator.EstimatedCost += 0.3f;		// add the cost of getting the shadow terms 
}
2 Likes