Go to:
Related nodes. Attributes.
Blend Colors is a utility node that allows you to blend
together two input colors or textures, using a third value to
control the blend.
The color of the output is determined by the
Blender attribute, which can range from 0 to 1. When Blender
is 1, the Output is set to Color 1. When Blender is 0, Output is
set to Color 2. When Blender is 0.5, Output is an equal mix of
the two colors.
By applying a texture map to Blender (say, an image of white text
on a black background) you can create a shader that uses Color 1
for the text, and Color 2 for the background.
Here is the formula used for color blending:
Output[i] = Color1[i] * Blender[i] + Color2[i] * (1.0 - Blender[i])
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 |
---|
blendColors | node | utility/color:drawdb/shader/operation/blendColors | kBlendColors | kBase kNamedObject kDependencyNode kBlendColors |
Related nodes
clamp, lightInfo, gammaCorrect, surfaceLuminance, contrast, luminance, rgbToHsv, hsvToRgb, samplerInfo, setRange, resolution, renderQuality, renderGlobals, renderGlobalsList, baseShadingSwitch, singleShadingSwitch, doubleShadingSwitch, tripleShadingSwitch
Attributes (14)
blender, color1, color1B, color1G, color1R, color2, color2B, color2G, color2R, output, outputB, outputG, outputR, renderPassMode
Long name (short name) | Type | Default | Flags |
---|
|
blender
(b )
| float | 0.5 | |
|
|
color1
(c1 )
| float3 | 1.0, 0.0, 0.0 | |
|
|
|
|
|
color2
(c2 )
| float3 | 0.0, 0.0, 1.0 | |
|
|
|
|
|
output
(op )
| float3 | 0.0, 0.0, 0.0 | |
|
| outputR
(opr )
| float | 0.0 | | |
|
| outputG
(opg )
| float | 0.0 | | |
|
| outputB
(opb )
| float | 0.0 | | |
|
|
renderPassMode
(arp )
| enum | 1 | |
|