Go to:
Related nodes. Attributes.
Triple Shading Switch is a utility node that enables
you to switch between different values based on which surface
is being shaded.
For example, say you have a complex shading network that is being
used by many objects. However, two of these objects need to use
different colors in one of the textures.
You could accomplish this by copying the entire shading network for
each of these objects. But if you do that, any changes made to
the shading network later will have to be repeated for each of the
copies.
Instead of copying the network, just use one network with a
Triple Shading Switch node. Connect the Output attribute of the Triple
Shading Switch to the Color attribute of the texture. Set the
Default attribute of the Triple Shading Switch to the color value
used by most shapes. Then, for each object that needs a different
color, specify the object and its particular value.
Now, you can assign the same shader to all the objects, and the
objects that need the different color values will get them
automatically.
Note: The Triple Shading Switch only works on triple-valued
attributes, such as colors or xyz coordinates. If you need to switch
single attributes (such as Intensity
of Translucence), use a Single Shading Switch. If you need to switch
double attributes, such as UV coordinates, use a Double
Shading switch.
In the table below, important attributes have their names listed
in bold in the description column.
This node is MP safe
Node name | Parents | Classification | MFn type | Compatible function sets |
---|
tripleShadingSwitch | baseShadingSwitch | utility/switch:drawdb/shader/operation/tripleShadingSwitch | kTripleShadingSwitch | kBase kNamedObject kDependencyNode kTripleShadingSwitch |
Related nodes
blendColors, clamp, lightInfo, gammaCorrect, surfaceLuminance, contrast, luminance, rgbToHsv, hsvToRgb, samplerInfo, setRange, resolution, renderQuality, renderGlobals, renderGlobalsList, baseShadingSwitch, singleShadingSwitch, doubleShadingSwitch
Attributes (14)
defComp1, defComp2, defComp3, default, inComp1, inComp2, inComp3, inShape, inTriple, input, outComp1, outComp2, outComp3, output
Long name (short name) | Type | Default | Flags |
---|
|
default
(def )
| float3 | 0.8, 0.8, 0.8 | |
|
|
|
|
|
input
(i )
| compound | n/a | |
|
|
|
|
output
(out )
| float3 | 0.0, 0.0, 0.0 | |
|
| outComp1
(oc1 )
| float | 0.0 | | |
|
| outComp2
(oc2 )
| float | 0.0 | | |
|
| outComp3
(oc3 )
| float | 0.0 | | |
|