Skip to main content

vJSONAttrRandomize

Adds a repeatable random offset to point coordinates or to scalar values.

BeginnerMograph / JSONJSONArrayScriptVal
vJSONAttrRandomize node

vJSONAttrRandomize takes an array and adds a random offset between Min Offset and Max Offset to each XYZ point or to each scalar value. The same Seed always gives the same result.

Parameters​

ParameterTypeDefaultDescription
DistributionDropdownUniformUniform (default) or Gaussian. Gaussian is cut at three spreads and stays inside Min and Max.
Apply ToDropdownXYZ CoordinatesXYZ Coordinates (default) offsets X, Y and Z of each point. Scalar Values offsets each number, or the first value of a list.
Min OffsetFloat-0.1Lower limit of the offset. Default -0.1.
Max OffsetFloat0.1Upper limit of the offset. Default 0.1.
SeedInteger0Integer from 0, slider to 10000, default 0. The same Seed gives the same offsets.
+4 more parameters
ParameterTypeDefaultDescription
Randomize XInteger1Offsets X when checked (default). XYZ mode only.
Randomize YInteger1Offsets Y when checked (default). XYZ mode only.
Randomize ZInteger1Offsets Z when checked (default). XYZ mode only.
InputDATATYPE—Data to process.
Read the full description

Each element gets an offset between Min Offset and Max Offset. Apply To XYZ Coordinates gives X, Y and Z their own offsets and writes three values, so a fourth value is dropped. Scalar Values gives a number, or the first value of a list, one offset. Min and Max are swapped if Min is larger.

Uniform spreads the offset evenly between the limits. Gaussian centers on their midpoint with a spread of one sixth of their difference and cuts at three spreads, so it stays inside the limits.

The value depends only on Seed, the element index and the axis, so the same Seed repeats the result. Randomize X, Y and Z, all on by default, apply to XYZ mode only.

Example Connections​

vJSONPointsOnGrid.Output -> vJSONAttrRandomize.Input
vJSONAttrRandomize.Output -> vJSONCameraProjection.ArrayA
vJSONCameraProjection.Output -> vJSONShapeRender.ArrayPoint
Background.Output -> vJSONShapeRender.Input