What is it for?
- Keeping a value within 0â1
- Preventing positions or strengths from varying too far
- Producing a safe value that cannot exceed a lower or upper bound
Overview
A safety node that confines a number to a specified range. Values outside the range stick to the nearest endpoint. It is typically placed immediately before a parameter input so that a runaway waveform or calculation cannot break downstream processing.
Usage tips
- Choose between this node and
remapby intent: Remap converts a range while preserving proportions; Clamp clips only the values outside a range. Use Clamp when values already inside the range must pass through unchanged. - Placing the
Normalizedpreset before opacity and other 0â1 ratio inputs is the go-to setup. - You can also use the flattened out-of-range portions intentionally to cap a waveform and create a trapezoid-like shape.
Related nodes
remapâ convert a range by compressing or expanding itmath_opâMinandMaxcan limit only one sideexpression_floatâ writeclamp()directly in an expression
Range presets
Normalized- The go-to preset for limiting a value to
0..1.
- The go-to preset for limiting a value to
SignedNormalized- Suited to signed strengths such as
-1..1.
- Suited to signed strengths such as
Percent- Suited to percentage values from
0..100.
- Suited to percentage values from
Count- Suited to counts or step counts from
1..16.
- Suited to counts or step counts from
PixelOffset- Suited to pixel offsets from
-32..32.
- Suited to pixel offsets from
LargeOffset- Suited to larger offsets from
-256..256.
- Suited to larger offsets from
Custom- Use this when you want
min/maxto define the clamp range.
- Use this when you want
Notes
- When
min > max, the node automatically swaps them before processing. - The output port is
Number, but the value currently returned at runtime isFloat. - For every preset except
Custom,range_presetitself determines the evaluated clamp range. The selected preset remains authoritative even if saved data or PPL contains stalemin/maxvalues. min/maxare evaluated as the actual bounds only inCustommode.- For fine adjustments, switch to
Customand usesoft_min/soft_max/soft_step.
Examples
range_preset = Normalized- Quickly creates a
0.0â1.0range. - Useful for limiting opacity and ratio values.
- Quickly creates a
- Keep the output of
Noise Wavewithin0.0â1.0- Useful when negative values or values above 1 must not pass downstream unchanged.
- Pass the result of
Math Op(Add)throughClamp- Suppresses values that have grown too large through addition.
- Limit a value to
0â1beforeOpacity- Keeps the opacity input within a safe range.
range_preset = PixelOffset- Quickly creates a position-correction clamp from
-32..32.
- Quickly creates a position-correction clamp from
- Fix ratio inputs for
RevealorTrimto0â1- Helps prevent glitches during animation.