Skip to main content

Number Range

Intro

The Number Range can be used to remap values within a range. For example, if a set of input values are in a range of 0-100 the Number Range can be used to increase those values to output a range of 0-400.

UI

Source Minimum - The smallest value within your range.

Source Maximum - The largest value within your range.

Value - Connect a range of values (e.g. from a Spreadsheet)

Minimum - The value to remap Source Minimum to.

Maximum - The value to remap Source Maximum to.

Graph - See Common Attributes (Behaviours)

Clamp - When checked, the output will never go above or below the Maximum or Minimum values.

Offset - Add/subtract a value to/from the output.

Spreadsheet

This Layer is also used as a base for options on the Spreadsheet Utility. The Value attribute will not appear within the Spreadsheet Attribute Editor UI as that is being driven by the data connected to the Spreadsheet.

Example
  1. Create 2 Shapes (Shape1 and Shape2).
  2. Create a Number Range.
  3. Set:
    • Source Minimum = -100
    • Source Maximum = 100
    • Minimum = -400
    • Maximum = 400
  4. Connect shape1.position.ynumberRange.value.
  5. Connect numberRange.idshape2.position.y.
  6. Move Shape1 up and down in the Viewport.

As Shape1 reaches a position of 100 in the Y axis, Shape2 will move to a position of 400. If Clamp is checked then as Shape1 moves above 100 Shape2 will remain at 400.

Inverting Values

Regardless of the values entered in Minimum and Maximum, the smallest value will always be used as the Minimum and the largest value as the Maximum. For example, where the value entered into the Minimum attribute is actually larger than the Maximum attribute, those values will be inverted as part of the Layer's calculation. This is also true of Source Minimum and Source Maximum.