🎉 Welcome to the Mirage Renderer Docs Beta.

Random Nodes
Weighted Random Range

Weighted Random Range

Creates an array between LowerRange and UpperRange with the array structure of ArrayStructure, based on Distribution (Curve)

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. Distribution (optional): Distribution probabilities between ranges (Curve). If not connected uniform distribution assumed.
  5. SampleCount: If ranges are float values, the distribution is sampled by SampleCount
  6. Sort (optional): true -> ascending, false -> descending, empty no sorting. (bool)
  7. RandomSeed (optional): Random number generator seed. If not connected, the node will use Graph’s random number generator (int)

Outputs

  1. Out: Random array with the structure of ArrayStructure

Example

Weighted Random Range node example