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 the 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 -> 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).
Enabled. Rollover images for disabled (default).
The effect of silhouette is also evident on the edges of the pillars and steps (separate objects) in the interior scene below (rollover image).
Disabled (default). Rollover image for enabled.
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.
Use Toon ID
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).