When turned off, the edge detection is disabled (enabled by default).
- To view the Toon Edge, you must change the Filter Type (Sampling settings) to Contour.
- Increasing the Contour Filter Width (Sampling settings) value will increase render times.
The color of the toon edge. The line style can be controlled with a texture here.
Connect a ramp node here to change the Edge Color based on the shading result of the B
The direct diffuse shading contribution is mapped into the UVs. So in the example below, the back of the sphere (which has the darkest direct diffuse) is blue and the part of the sphere hit directly by the directional light is green. This then becomes yellow as the exposure of the lighting is increased.
In the example below, the Edge Color (yellow) is multiplied by the blue ramp color (connected to Edge Tonemap) to give green.
The maximum width of contour lines is determined by the Width parameter of the Contour Filter. The actual width is the multiplication of it and this parameter. The line style can be controlled by combining this with a texture.
To increase the Edge Width Scale above 1, you will need to increase the Contour Filter Width. However, this will increase render times.
You can avoid Edge 'cluttering' in the center by connecting a Facing Ratio shader to Width Scale.
The Width Scale can be used to control the Edge depending on the distance from the camera.
You may notice flickering in animations using Width Scale values below 1. Enabling Lock Sampling Pattern (Sampling render settings) should fix this issue.
If enabled, edge detection uses the difference of IDs from neighboring pixels.
Enabled (default). Rollover image for disabled.
Curve, Point, and Shape IDs
Detects the difference of shaders of neighboring samples. This is useful when multiple shaders are assigned to a single polymesh, for example.
Ensure that the Angle Threshold is low enough, otherwise, you may not notice a difference.
The edge is detected when the mask color of neighboring pixels is different. The Mask Color is assumed to have a texture connected to draw an arbitrary shape by detecting color differences.
With this parameter, lines can be drawn anywhere (the filter draws lines where the color of the Mask changes).
Stylistic effects achieved by connecting different shaders to Mask Color
The Shade Modes of the Utility shader can be used to add more detail to the Edge when connected to Mask Color.
Utility shader connected to Mask Color
A tutorial that covers how to use the Edge Mask Color can be found here.
If enabled, edge detection uses the difference of UVs from neighboring pixels.
When less than 180, the Edge detection uses the difference of the angle between neighboring pixels.
Angle Threshold keyframed from 180 to 10
The normal used in the Edge detection. Choose from: Shading Normal, Smoothed Normal, and Geometric Normal.
Smoothed Normal. Rollover image to view Geometric Normal.
Advanced Edge Control
Changes the sorting priority of the Edge.
0 (all objects).
Red sphere 1.
Rollover image for red sphere 0, green sphere 1.
Blue plane 1 (both spheres 0).
By default, the contour color is affected by ray throughput. If a specific color is required for a reflected/refracted object, enable this and use a ray_switch shader.
Edge detection can be controlled using a
STRING type user data called Toon ID. Otherwise, the detected edges will be driven by the object's own name as a toon-specific ID. This allows for grouping of objects, where Toon ID specifies which objects belong together regarding edge detection.
Displacing the surface with a texture can help to create a 'cross hatch' effect with Toon Edge shading.
Teapot displaced with Noise shader
Pepe model by Daniel M. Lara (Pepeland).