🎉 Welcome to the Mirage Renderer Docs Beta.

Random Nodes
Random Range

Random Range

Creates an array based on Distribution. Values will be between LowerRange and UpperRange

Inputs

  1. LowerRange: Lower range of random number (inclusive) (float, int, Vector2, Vector2Int, Vector3, Vector3Int, Vector4)[]-[][]-[][][]-[][][][]
  2. UpperRange: Upper range of random number (exclusive) (float, int, Vector2, Vector2Int, Vector3, Vector3Int, Vector4)[]-[][]-[][][]-[][][][]
  3. ArrayStructure: Result array structure. Could be a scalar, if scalar dimensions will be based on its values. (float, int, Vector2, Vector2Int, Vector3, Vector3Int, Vector4)[]-[][]-[][][]-[][][][]
  4. RandomSeed (optional): Random number generator seed. If not connected, the node will use Graph’s random number generator (int)

Outputs

  1. Out: Random array based on Distribution port or Lower/UpperRange distribution

Remarks:

Out array distribution is based on either distribution of Lower/UpperRange or Distribution ports. If one of the ranges is a scalar and the other is an array, scalar acts like a same dimension array. If both array, they should be the same dimension. If Distribution port is occupied by a value, Lower/UpperRange should be scalar. If Distribution port is occupied by a scalar such as Vector2, the result will be a T[Vector2.x][Vector2.y] array

Example

Random Range node example