Skip to main content

vJSONMap

Rescales the values of an array with min-max, z-score or norm methods.

IntermediateMograph / JSONJSONArrayScriptVal
vJSONMap node

vJSONMap takes an array of numbers or points and rescales its values with the chosen normalization method. Per Axis decides whether X, Y and Z are scaled separately or together.

Parameters​

ParameterTypeDefaultDescription
Normalization MethodDropdownMin-Max (0 to 1)Min-Max (0 to 1) (default), Min-Max (Custom Range), Z-Score (Standardize), Unit Vector (L2 Norm), L1 Norm (Sum to 1) or Max Abs (Scale by Max).
CustomMinFloat0Output minimum for Min-Max (Custom Range). Minimum -1, default 0.
CustomMaxFloat1Output maximum for Min-Max (Custom Range). Minimum -1, default 1.
Normalize Per AxisInteger1.0Rescales X, Y and Z separately when on (default), or all values together when off.
InputDATATYPE—Numbers or points to rescale.
Read the full description

Normalization Method chooses how the values are rescaled. Min-Max (0 to 1) maps the smallest value to 0 and the largest to 1, and Min-Max (Custom Range) maps them to Custom Min and Max. Z-Score subtracts the mean and divides by the standard deviation. Unit Vector divides by the square root of the sum of squares, L1 Norm by the sum of absolute values, and Max Abs by the largest absolute value.

With Per Axis on (the default), each of X, Y and Z is rescaled using its own statistics. With it off, all values of all axes are pooled. A flat list of numbers is rescaled as one set. A zero divisor is replaced by a very small number. A label under the controls shows the statistics.

An empty or invalid input raises an error.

Example Connections​

vJSONFromOBJ.Points -> vJSONMap.Input
vJSONMap.Output -> vJSONCameraProjection.ArrayA
vJSONCameraProjection.Output -> vJSONShapeRender.ArrayPoint
Background.Output -> vJSONShapeRender.Input