Go to: Related nodes. Attributes.
Clamp is a utility node that can be used to keep a color
value within a specified range. Input values outside the range are
"clamped" to the allowed range.
For example, if you set MinR to 0.3 and MaxR to 0.6, here are the
outputs you would get for various inputs:
InputR: 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
OutputR: 0.3 0.3 0.3 0.4 0.5 0.6 0.6 0.6 0.6
You can also use this node to clamp individual values (not just
colors) to a specified range. To do this, just attach the value to
one of the R, G, or B channels of the input (e.g. Input R or
Input G). 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 |
clamp |
dependNode |
utility/color |
kClampColor |
kBase
kNamedObject
kDependencyNode
kClampColor |
Related nodes
blendColors, lightInfo, gammaCorrect, surfaceLuminance, contrast, luminance, rgbToHsv, hsvToRgb,
samplerInfo, setRange, resolution, renderQuality, renderGlobals, renderGlobalsList, baseShadingSwitch, singleShadingSwitch, doubleShadingSwitch, tripleShadingSwitch
Attributes (17)
input, inputB, inputG,
inputR, max,
maxB, maxG,
maxR, min, minB, minG, minR, output, outputB, outputG,
outputR, renderPassMode
Long name (short name) |
Type |
Default |
Flags |
|
min (mn ) |
float3 |
0.0, 0.0, 0.0 |
|
|
|
|
|
max (mx ) |
float3 |
0.0, 0.0, 0.0 |
|
|
|
|
|
input
(ip ) |
float3 |
0.0, 0.0, 0.0 |
|
|
|
|
|
renderPassMode
(arp ) |
enum |
1 |
|
|
output
(op ) |
float3 |
0.0, 0.0, 0.0 |
|
|
outputR
(opr ) |
float |
0.0 |
|
|
|
outputG
(opg ) |
float |
0.0 |
|
|
|
outputB
(opb ) |
float |
0.0 |
|
|