Skip to main content

Clamp

The Bounder. Constrains float values to a specific range. Any value below the minimum is set to the minimum, and any value above the maximum is set to the maximum.

Ports

PortTypeDescription
Input FloatThe field to clamp.
Output FloatThe clamped field.

Details

Parameters

  • Min: The lowest allowed value.
  • Max: The highest allowed value.

Potential Use Cases

  • Hard Limits: Ensure that a noise field or distance field never exceeds a certain value (e.g., preventing "overflow" when adding multiple noise layers).
  • Mask Preparation: Clamp a noise field to 0.0 - 0.5 before thresholding to create very "choppy" or "dense" patterns.
  • Normalization: After adding two noise fields (which might result in values from 0.0 to 2.0), use Clamp with a Max of 1.0 to ensure the output remains within a standard range.