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

vScriptValAttrRandomize 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
| Parameter | Type | Default | Description |
|---|---|---|---|
| Distribution | Dropdown | Uniform | Uniform (default) or Gaussian. Gaussian is cut at three spreads and stays inside Min and Max. |
| Apply To | Dropdown | XYZ Coordinates | XYZ Coordinates (default) offsets X, Y and Z of each point. Scalar Values offsets each number, or the first value of a list. |
| Min Offset | Float | -0.1 | Lower limit of the offset. Default -0.1. |
| Max Offset | Float | 0.1 | Upper limit of the offset. Default 0.1. |
| Seed | Integer | 0 | Integer from 0, slider to 10000, default 0. The same Seed gives the same offsets. |
+4 more parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Randomize X | Integer | 1 | Offsets X when checked (default). XYZ mode only. |
| Randomize Y | Integer | 1 | Offsets Y when checked (default). XYZ mode only. |
| Randomize Z | Integer | 1 | Offsets Z when checked (default). XYZ mode only. |
| Input | DATATYPE | — | 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
- Randomize a grid and draw
- Randomize a circle, then move it
vScriptValPointsOnGrid.Output -> vScriptValAttrRandomize.Input
vScriptValAttrRandomize.Output -> vScriptValCameraProjection.ArrayA
vScriptValCameraProjection.Output -> vScriptValShapeRender.ArrayPoint
Background.Output -> vScriptValShapeRender.Input
vScriptValPointsOnCircle.Output -> vScriptValAttrRandomize.Input
vScriptValAttrRandomize.Output -> vScriptValTranslate.Input