Page History
...
Multiexcerpt | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||
The toon shader is part of a non-photorealistic rendering (NPR) solution that is provided in combination with the Contour Filter contour_filter. There are some current limitations when using the toon shader. These are as follows:
The diagram and accompanying text below describe the shading components that form the toon shader. Note that the appearance of the base_tonemap (using a ramp) appears very different with skydome lighting (soft gradation) compared to that of say a directional light (hard gradation). Rollover the image below to view the effect of lighting on the base_tonemap ramp.
1. Edge (requires Contour Filter)The toon shader supports line_color and width_control. Both of these are useful for avoiding line clutter and changing the line stroke style. The edge detection also uses id, mask color, and texture UV discontinuity.
2. Stylized HighlightAn arbitrary texture that can be used to create a highlight. A light must be specified for the stylized highlight.
3. Specular/Base Tone MappingThe toon shader uses cell shading via ramp nodes for both base and specular. While it is recommended to connect ramp shaders to the tonemap attributes, any shader can be connected. 4. Rim LightingConnect a ramp here to create a rim lighting effect. A light can be specified to create the rim lighting effect.
|
...
Multiexcerpt | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
Detects the difference of shaders of neighboring samples. This is useful when multiple shaders are assigned to a single polymesh, for example.
|
...
uv_threshold
Multiexcerpt | ||||||
---|---|---|---|---|---|---|
| ||||||
If enabled, edge detection uses the difference of UVs from neighboring pixels.
|
angle_threshold
Multiexcerpt | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
When less than 180, the edge detection uses the difference of the angle between neighboring pixels.
|
...
Multiexcerpt | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
The specular weight. Influences the brightness of the specular highlight. The base_weight is affected by the specular_weight. This is because the toon shader is not a physically based shader but is designed to conserve energy.
|
...
specular_color
Multiexcerpt | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
The color the specular reflection will be modulated with. Use this color to 'tint' the specular highlight. You should only use colored specular for certain metals, whereas non-metallic surfaces usually have a monochromatic specular color. Non-metallic surfaces normally do not have a colored specular.
|
specular_roughness
Multiexcerpt | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
Controls the glossiness of the specular reflections. The lower the value, the sharper the reflection. In the limit, a value of 0 will give you a perfectly sharp mirror reflection, while 1.0 will create reflections that are close to a diffuse reflection. You should connect a map here to get variation in the specular highlight.
|
specular_anisotropy
Multiexcerpt | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Anisotropy reflects and transmits light with a directional bias and causes materials to appear rougher or glossier in certain directions. The default value for Anisotropy is 0, which means 'isotropic.' As you move the control towards 1.0, the surface is made more anisotropic in the U axis.
|
specular_rotation
Multiexcerpt | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
The rotation value changes the orientation of the anisotropic reflectance in UV space. At 0.0, there is no rotation, while at 1.0 the effect is rotated by 180 degrees. For a surface with brushed metal, this controls the angle at which the material was brushed. For metallic surfaces, the anisotropic highlight should stretch out in a direction perpendicular to the brushing direction.
|
...
specular_tonemap
Multiexcerpt | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
Connect a ramp node here to create a cell look (regarded as a tone map).
|
...
Multiexcerpt | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
The transmission allows light to scatter through the surface, for materials such as glass or water.
|
transmission_color
Multiexcerpt | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
Transmission_color multiplies the refracted result by a color.
|
...
Multiexcerpt | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
The IOR parameter (Index of Refraction) defines the material's fresnel reflectivity and is by default the angular function used. Effectively the IOR will define the balance between reflections on surfaces facing the viewer and on surface edges. You can see the reflection intensity remains unchanged, but the reflection intensity on the front side changes a lot.
|
...
normal
Multiexcerpt include | ||||||
---|---|---|---|---|---|---|
|
...
Multiexcerpt | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
|
...
indirect_specular
Multiexcerpt include | ||||||
---|---|---|---|---|---|---|
|
...
Multiexcerpt | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Choose the component(s) affected by bump:
|
energy_conserving
Multiexcerpt | ||
---|---|---|
| ||
The toon shader is energy conserving by default. If this is disabled, the Toon shader simply adds base, specular, and transmission. Care should be taken when disabling this option as it will affect indirect illumination with the toon shader. |
...
Multiexcerpt | ||
---|---|---|
| ||
An optional aov_prefix that will be prepended to the toon AOVs' names. For instance, if aov_prefix is |
...
Pepe model by Daniel M. Lara (Pepeland). Mery model by Jose Manuel Garcia, www.meryproject.com. Cubebot by Christophe Desse.
...