Go to: Related nodes. Attributes.

Set Range is a utility node that allows you to take values in one range, and map them into another range.

For example: Say you have an rotation attribute whose value goes from 0 to 360. You want to use this attribute to drive a color value, which goes from 0 to 1.

To do this:

The input of Set Range is a triple value, so you can use it for vectors, or colors. If you want to set the range for single values, just use one of the X, Y, or Z channels.

Here is the mathematical calculation done by this node:

In the table below, important attributes have their names listed in bold in the description column.

This node is MP safe

Node nameParentsClassificationMFn typeCompatible function sets
setRangedependNodeutility/generalkSetRangekBase
kNamedObject
kDependencyNode
kSetRange

Related nodes

blendColors, clamp, lightInfo, gammaCorrect, surfaceLuminance, contrast, luminance, rgbToHsv, hsvToRgb, samplerInfo, resolution, renderQuality, renderGlobals, renderGlobalsList, baseShadingSwitch, singleShadingSwitch, doubleShadingSwitch, tripleShadingSwitch

Attributes (24)

max, maxX, maxY, maxZ, min, minX, minY, minZ, oldMax, oldMaxX, oldMaxY, oldMaxZ, oldMin, oldMinX, oldMinY, oldMinZ, outValue, outValueX, outValueY, outValueZ, value, valueX, valueY, valueZ

Long name (short name)TypeDefaultFlags
value (v) float30.0, 0.0, 0.0outputinputconnectablestorable
Value. This value will be mapped from the old range (Old Min to Old Max) into the new range (Min to Max).
valueX (vx) float0.0outputinputconnectablestorablekeyable
Input Value X component
valueY (vy) float0.0outputinputconnectablestorablekeyable
Input Value Y component
valueZ (vz) float0.0outputinputconnectablestorablekeyable
Input Value Z component
min (n) float30.0, 0.0, 0.0outputinputconnectablestorable
Min is the minimum value in the new range.
minX (nx) float0.0outputinputconnectablestorablekeyable
Min value X component
minY (ny) float0.0outputinputconnectablestorablekeyable
Min value Y component
minZ (nz) float0.0outputinputconnectablestorablekeyable
Min value Z component
max (m) float30.0, 0.0, 0.0outputinputconnectablestorable
Max is the maximum value in the new range.
maxX (mx) float0.0outputinputconnectablestorablekeyable
Max value X component
maxY (my) float0.0outputinputconnectablestorablekeyable
Max value Y component
maxZ (mz) float0.0outputinputconnectablestorablekeyable
Max value Z component
oldMin (on) float30.0, 0.0, 0.0outputinputconnectablestorable
Old Min is the minimum value in old range.
oldMinX (onx) float0.0outputinputconnectablestorablekeyable
Old Min X component
oldMinY (ony) float0.0outputinputconnectablestorablekeyable
Old Min Y component
oldMinZ (onz) float0.0outputinputconnectablestorablekeyable
Old Min Z component
oldMax (om) float30.0, 0.0, 0.0outputinputconnectablestorable
Old Max is the maximum value in old range.
oldMaxX (omx) float0.0outputinputconnectablestorablekeyable
Old Max X component
oldMaxY (omy) float0.0outputinputconnectablestorablekeyable
Old Max Y component
oldMaxZ (omz) float0.0outputinputconnectablestorablekeyable
Old Max Z component
outValue (o) float30.0, 0.0, 0.0outputconnectable
Out Value. This is the new calculated value.
outValueX (ox) float0.0outputconnectable
Output Value X component
outValueY (oy) float0.0outputconnectable
Output Value Y component
outValueZ (oz) float0.0outputconnectable
Output Value Z component