Go to:
Related nodes. Attributes.
Single 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 have
different Diffusion value.
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
Single Shading Switch node. Connect the Output attribute of the Single
Shading Switch to the Diffusion attribute of the shader. Set the
Default attribute of the Single Shading Switch to the value
used by most shapes. Then, for each object that needs a different
value, 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 diffusion values will get them
automatically.
Note: The Single Shading Switch only works on single-valued
attributes. If you need to switch double attributes, such as UV
coordinates, use a Double Shading Switch. If you need to switch
triple attributes, such as 3d coordinates, or colors, use a Triple
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 |
---|
singleShadingSwitch | baseShadingSwitch | utility/switch | kSingleShadingSwitch | kBase kNamedObject kDependencyNode kSingleShadingSwitch |
Related nodes
blendColors, clamp, lightInfo, gammaCorrect, surfaceLuminance, contrast, luminance, rgbToHsv, hsvToRgb, samplerInfo, setRange, resolution, renderQuality, renderGlobals, renderGlobalsList, baseShadingSwitch, doubleShadingSwitch, tripleShadingSwitch
Attributes (5)
default, inShape, inSingle, input, output
Long name (short name) | Type | Default | Flags |
---|
|
input
(i )
| compound | n/a | |
|
|
|
|
default
(def )
| float | 0.0 | |
|
|
output
(out )
| float | 0.0 | |
|