| Paint | Ink | Seams | Transparency | Reflection | Render Tree Usage
Category: Toon
Shader Family: Surface Material
Output: Color
This shader is a material host for Toon-rendered ink contours. By itself, it is of little use, as it does no surface illumination
computation of its own. However, used in conjunction with the lens shader , this shader is able to modify or override global ink properties on a per-material basis. This shader is also required for
proper rendering of secondary ray contours (contours which appear in reflections or through transparent surfaces). Though
it is certainly possible to render ink contours using only the shader, this material host is useful for finer control over their attributes.
Because this shader does no surface illumination calculations, by itself it is only able to color surfaces a constant color.
Using the Render Tree interface or a Phenomenon constructed using this shader though, it is possible to render ink in conjunction
with any surface texturing scheme or illumination model normally at one's disposal.
This shader also functions as a shadow shader, computing shadow color based on transparency.
|
The shader's name. Enter any name you like, or leave the default.
|
Paint
The surface color returned by the shader. This is typically where one might connect the Toon_Paint node output.
|
Specify color. Use this parameter in a Render Tree shader graph as the input from any material-shading node. This will become
the surface-color underlying the contours.
|
Ink
Control over per-material ink attributes.
|
Bypass contour rendering for the current surface.
|
|
Do not render contours detected on back-facing surfaces (i.e., surfaces whose normals face away from the camera or incoming
secondary ray).
|
Boundaries
Local control over what ink is visible. This allows hiding ink where contours are detected around an object (silhouette) or
inside the object's shape (interior). These controls act in concert with Toon_Ink_Lens' Sampling controls.
|
Ink around an object's silhouette (where the object is visible against the environment or another object).
|
|
Ink drawn in the interior of an object.
|
Override
Overrides global contour attributes (set using the Toon Ink Lens shader).
|
Enables this group of parameters.
|
|
Contour color. This overrides the color and alpha set for ink in the Toon Ink Lens shader.
|
|
Choose from the available transfer modes to specify how to composite ink onto the underlying surfaces. This overrides the
Compositing set in the Toon Ink Lens shader. The following modes are available:
-
. This is the default. It simply takes the foreground.
-
. The foreground is added to the background. Thus, no foreground will be visible if the foreground is black. This is useful
for compositing such that the foreground appears to glow.
-
. Multiplies the foreground by the background. The result is always a color darker than either original foreground or background,
much like the result of two overhead transparencies stacked and projected from a single projector.
-
. The inverses of the two color values are multiplied. The result is a foreground brighter than either the original foreground
or background.
-
. Either multiplies or screens, depending on the value of the background underneath. The overall result is that the background
is not replaced by the foreground, but is mixed with it, while weighted by the value of the original background.
-
. Compares the values of the foreground and background and chooses the lighter of the two. The overall result is that the
foreground can never do anything except make the background lighter.
-
. Compares the values of the foreground and background and chooses the darker of the two. The overall result is that the foreground
can never do anything except make the background darker.
-
. The foreground is subtracted from the background, producing an inverted color effect.
-
. Uses the luminance and saturation of the background and the hue of the foreground.
-
. Uses the hue and luminance of the background and the saturation of the foreground.
-
. Uses the hue and saturation of the background and the luminance (value) of the foreground.
-
. If the value of the foreground is greater/less than 50% gray, the underlying background is lightened/darkened by the foreground.
This is similar to shining a diffuse light on the image.
-
. If the value of the foreground is greater/less than 50% gray, the background is screened/multiplied by the foreground. This
is similar to shining a harsh light on the image.
-
. Similar (though not identical) to mode.
|
Modify
Modify global contour attributes (set using the Toon Ink Lens shader). A setting of 1 for any of these parameters has no effect.
|
Modify ink spread local to the current material. This is a simple scaling factor applied to the global ink spread (a value
of 0.5 will decrease the ink spread to half its original value, for example).
|
|
Modify the direction threshold used for contour detection. This is a simple scaling factor (a value of 2 will increase the
threshold angle to twice its original value, for example).
|
Seams
Grouping to hide (blend) or reveal (unblend) ink contours where they would normally be visible (or, conversely, hidden).
Blend
Grouping to hide (blend) ink contours where they would normally be visible.
|
Blending is only allowed where the surface samples do not exceed this distance (in system units) from each other. This allows
contours between surfaces to be hidden where two surfaces are joined, for example, but not where they simply occlude each
other. The greater of two samples' Occlusion Distance settings is used.
Occlusion Distance is specified relative to the current ink spread. Thus an Occlusion Distance of 0.1 units is taken to mean
0.2 units when Spread is 2, for example. This ensures that hidden seams remain hidden even when thick ink contours are rendered.
Furthermore, Toon_Ink_Lens attempts to "normalize" the threshold distance relative to the distance from ray origins to the
samples in question.
|
|
Given two objects, if one object is in the Blend Objects list of the other (or vice-versa), no contour will be detected at
their intersection.
|
|
Contours are hidden where they would normally be drawn between surface samples sharing the same Blend Group id. A setting
of 0 deactivates this feature.
|
Unblend
Grouping to reveal (unblend) ink contours where they would not normally be visible.
|
Contours are inked where they would not normally be detected. This allows arbitrary placement of contours, even on a surface
that does not satisfy the usual criteria for contour detection (discontinuity, occlusion, different materials, etc.).
A setting of 0 deactivates this feature. By texturing this parameter it is possible to texture-map contours onto a surface.
|
Transparency
These controls control the rendering of refractive and transparent surfaces, including ink seen through such surfaces. For
these controls to have any effect on ink contours, the Toon Ink Lens shader's Trace Depth control (Sampling tab) must be set
to a value greater than 1.
|
Enable transparency/refraction effects.
|
|
There are two modes available for composition of secondary ray effects: Standard Blend and Preserve Colors. Standard Blend is the usual method of combining the surface color with the transmitted color (the two colors are mixed according
to the degree of transparency).
With Preserve Colors selected, the transmitted color is composited onto the surface according to the opacity of the occluded
surface. This has the sometimes-useful effect of leaving a surface color unchanged where nothing is transmitted through it.
|
|
Specification of transparency for red, green, and blue. This color modifies transmitted colors, like a filter: if it is set
to red, for example, objects seen through the surface will be tinted red (i.e., only their red components will be transmitted).
|
|
The index of refraction of this material (more specifically, the ratio of the refractive indices of the media on both sides
of a surface to which this shader is assigned).
|
|
Allows the user to adjust the threshold above which a surface is considered transparent (and below which, opaque). The greatest
of the transparency RGB channels is compared to the threshold, and the surface considered transparent, if found greater-than
the threshold.
|
Modify Surface Ink
Allows the transparency of a surface to modify the color of ink rendered on it.
|
Enable these parameters to modify the surface ink color/alpha.
|
|
The degree to which the ink color/alpah is affected. A setting of 0 will leave ink color/alpha unmodified, and a setting of
1 will result in 100% weight given the transparency color.
|
|
The method by which transparency color and ink color are combined. Choose from the available transfer modes. The modes are the same as described for the parameter for the Override options on the Ink tab in this property editor.
|
Modify Refracted Ink
Allows the transparency of a surface to modify the color of ink seen through it. The parameters are the same as for above.
Reflection
These controls control the rendering of reflective surfaces, including ink seen reflected in such surfaces. For these controls
to have any effect on ink contours, the Toon Ink Lens shader's Trace Depth control (Sampling tab) must be set to a value greater
than 1.
|
Enables reflection effects.
|
|
There are two modes available for composition of secondary ray effects: Standard Blend and Preserve Colors. Standard Blend is the usual method of combining the surface color with the reflected color (the two colors are mixed according
to the degree of reflectivity).
With Preserve Colors selected, the reflected color is composited onto the surface according to the opacity of the reflected
surface. This has the sometimes-useful effect of leaving a surface color unchanged where nothing is reflected off it.
|
|
Specification of reflectivity for red, green, and blue. This color modifies reflected colors: if it is set to blue, for example,
objects seen in reflections will be tinted blue (i.e., only their blue components will be reflected).
|
Modify Surface Ink
Allows the reflectivity of a surface to modify the color of ink rendered on it.
|
Enable these parameters to modify the surface ink color/alpha.
|
|
The degree to which the ink color/alpha is affected. A setting of 0 will leave ink color/alpha unmodified, and a setting of
1 will result in 100% weight given the reflection color.
|
|
The method by which reflection color and ink color are combined. Choose from the available transfer modes. The modes are the same as described for the parameter for the Override options on the Ink tab in this property editor.
|
Modify Reflected Ink
Allows the reflectivity of a surface to modify the color of ink reflected in it. The parameters are the same as for parameters above.
Render Tree Usage
Must be used in conjunction with Toon_Ink_Lens, its companion lens shader, and is typically used with a Toon_Paint shader
as well.