Studio Yotsuba
Back to Node List

Remap

remap

Remaps a value from one range to another

Reviewed
Guide available

Input Ports

NameTypeDescription
Input
input
Float
Required
Value to remap

Output Ports

NameTypeDescription
Output
output
Float
Remapped value

Parameters

NameTypeDefaultRangeDescription / Options
From Min
from_min
Float
-1-1000–1000 / step 0.01

Minimum of input range

From Max
from_max
Float
1-1000–1000 / step 0.01

Maximum of input range

To Min
to_min
Float
0-1000–1000 / step 0.01

Minimum of output range

To Max
to_max
Float
1-1000–1000 / step 0.01

Maximum of output range

Clamp
clamp
Bool
false—

Clamp output to [To Min, To Max] range

Overview

A unit-conversion adapter for numbers. It linearly converts one range, such as -1 to 1 from a sine wave, into the destination parameter range, such as -8 to 8px of movement. This numeric-routing utility appears between a waveform and a parameter almost every time.

Usage tips

  • Think simply: "input arrives in this range → output should use that range." Enter the four numbers without deriving a formula.
  • The go-to waveform pairing is motion (Wobble, amount 1) → remap(from -1..1, to 0..1) for an always-positive value.
  • Reverse the mapping with to_min > to_max, so output decreases as input rises. This is useful for inverse relationships such as darkening as distance closes.
  • Turn clamp ON when input might exceed the expected range, as insurance for a noise waveform or external input.

Common pitfalls

  • Values go beyond the range: by default, out-of-range input is extrapolated. Turn clamp ON to limit it.
  • Avoiding from_min=from_max out of concern for division errors: this safe case outputs the midpoint and does not fail. It will not create the intended motion, however, so review the range.
  • There is no acceleration or deceleration: Remap is linear. Use ease_in_out for easing or a curve node for a custom shape; keep Remap focused on range conversion.

Technical details

  • Output formula: to_min + (input - from_min) / (from_max - from_min) × (to_max - to_min)
  • With a zero input range (from_min = from_max), output the midpoint (to_min + to_max) / 2.
  • With clamp enabled, output is limited to [to_min, to_max], or the reversed [to_max, to_min].
  • Reverse mapping is supported with to_min > to_max.
  • from_min, from_max, to_min, and to_max can be promoted. Set clamp in the inspector.

Examples

[ExpressionFloat: sin(time*pi*2)] → output(-1.0..1.0) → [Remap(from:-1..1, to:0..255)] → pixel parameter

Use it to adapt a waveform to pixel-processing parameters, such as converting a sine expression's output from -1–1 into a 0–255 luminance range.

Related nodes

  • motion / motion / motion — source waveforms
  • ease_in_out — add easing without changing the range
  • clamp — apply only a range limit
  • math_op / expression_float — calculations beyond a linear conversion
Back to Node List