Constrains or rescales a float parameter input to fit within a specified range. It works like Clamp, but on a single value instead of a heightfield.
When to Use
Like all parameter devices, Scalar Clamp is mainly a tool for building good parameter controls for macros:
- Rescaling a control: Map a 0-1 value into a narrower range, such as 0.25-0.75.
- Limiting a control: Keep a value from going below a minimum or above a maximum.
How to Use
Connect a float parameter to the Parameter Input and the Parameter Output to the parameter you want to drive. With the default range of 0 to 1, the value passes through unchanged except that it is kept within 0 to 1.
Inputs
| Port | Type | Required | Description |
|---|---|---|---|
| Parameter Input | Parameter (float) | Yes | The parameter value to constrain. Other parameter types (integer, boolean, and so on) are rejected with an error. |
Outputs
| Port | Type | Description |
|---|---|---|
| Parameter Output | Parameter | The constrained or rescaled value. |
Parameters
Operation — How to apply the range. Default: Rescale. Options:
- Rescale — Scales the input (assumed to be in 0–1) into the target range. For example, if the range is 0.25–0.75, an input of 0.0 maps to 0.25 and an input of 1.0 maps to 0.75.
- Clamp — Limits the input to the target range without scaling. Values below the minimum are set to the minimum; values above the maximum are set to the maximum.
Value Range — The target range, set by a low and a high value anywhere from 0 to 1. Default: 0.0 to 1.0.