Since | 20.0 |
This node provides methods for creating float and integer array attributes populated by random values.
Parameters ¶
Generate When
Determines when this node will generate work items. You should generally leave this set to “Automatic” unless you know the node requires a specific generation mode, or that the work items need to be generated dynamically.
All Upstream Items are Generated
This node will generate work items once all of the input nodes have generated their work items.
All Upstream Items are Cooked
This node will generate work items once all of the input nodes have cooked their work items.
Each Upstream Item is Cooked
This node will generate work items each time a work item in an input node is cooked.
Automatic
The generation mode is selected based on the generation mode of the input nodes. If any of the input nodes are generating work items when their inputs cook, this node will be set to Each Upstream Item is Cooked. Otherwise, it will be set to All Upstream Items are Generated.
Create When
When this parameter is on, you can set it to an expression that’s evaluated for each work item. The attribute below will only be created/updated on a work item if this parameter’s expression returns to a non-zero value for that item. For example, to set only an attribute on work items whose tile_x
attribute is greater than 5, enable this parameter and set its expression to @tile_x > 5
.
New Attribute Name
Name of the attribute to create.
Existing Name
What to do when there is already an attribute with the name New Attribute Name .
Replace Existing Attribute
Replace the attribute if it already exists.
Keep Existing Attribute
The old attribute is kept and no values are modified.
Update Existing Attribute
Overwrite the existing elements in-place, does not remove unaffected elements.
Append to Existing Attribute
Adds new elements to the end of the existing array.
Prepend to Existing Attribute
Adds new elements to the front of the existing array.
Generate Warning on Type-mismatch
When the existing attribute has a different type, generate a node warning and does not change the attribute.
Generate Error on Type Mis-match
When the existing attribute has a different type, generate a node error.
Array Type
The data type of the array to create. If set to Float, numbers from integer distributions will be converted to a Float
attribute. If set to Integer, numbers from floating point distributions will be rounded and converted to an Int
attribute.
Rounding
This determines the method that is used to round numbers from floating point distributions to integers. This is enabled if Array Type is set to Integer.
Round Nearest
Round to the nearest integer. For example: 1.7 rounds to 2 and 1.2 rounds to 1. When a number is perfectly between two integers, we round up; i.e. 1.5 rounds to 2.
Round Up
Round to the nearest integer greater than the generated number. For example: 1.2 and 1.7 both round to 2.
Round Down
Round to the nearest integer less than the generated number. For example: 1.2 and 1.7 both round to 1.
Array Size
The size of the resulting array of random numbers.
Random Seed
The random seed used to generate the random numbers. Modify this if you want to generate different random numbers from the same distribution. Otherwise, if the seed remains the same, it is guaranteed that with every run, the node will generate the same numbers. Two nodes with the same seed and settings will also generate the same numbers.
Random Distribution
The type of probability distribution from which values are generated.
Uniform (Continuous)
The generated values will be between Min Value and Max Value (inclusive), with equal probability for all values in that range.
Uniform (Discrete)
The generated values will be between Min Value and Max Value (inclusive), landing only on values that are some multiple of Step Size greater than Min value, with equal probability for all such values.
Two Value
The generated values will either be Value A or Value B, depending on Probability of Value B.
Normal (Gaussian)
The generated values will be drawn from the normal distribution whose mean/median is given by Middle Value, and whose standard deviation is given by Scale Around Middle.
Exponential
The generated values will be drawn from the exponential distribution whose median is given by Middle Value.
The mean and the standard deviation are equal to the median divided by ln(2)
.
Log-Normal
The generated values will be drawn from the log-normal distribution whose median is given by Middle Value and whose standard deviation is given by Spread Around Middle. This distribution is useful for generating random scales, because its values are strictly positive, and it tapers off toward zero, helping avoid scales that are too small or negative.
The parameter μ, of the underlying normal distribution is ln(median)
.
The parameter σ, of the underlying normal distribution is
sqrt(ln(0.5*(1 + sqrt(1 + 4*(stddev*stddev)/(median*median)))))
.
Custom Discrete
The specified values will be sampled with the specified weights, i.e. unnormalized probabilities.
Minimum
The minimum value that can be generated.
Maximum
The maximum value that can be generated.
Minimum
The minimum value that can be generated.
Maximum
The maximum value that can be generated.
Step
The step between each possible value that can be generated. For example, to generate numbers only among {4, 6, 8, 10} you should set this parameter to 2, and set Minimum to 4, and set Maximum to 10.
Value A
The first of the values that can be generated.
Value B
The second of the values that can be generated.
Probability of Value B
The likelihood that Value B will be generated. Increase this if you want to increase the number of occurences of Value B or if you want to decrease the number of occurences of Value A.
Middle Value
The median of the distribution. The region with the highest probability of generating numbers is around this parameter.
Scale Around Middle
The standard deviation of the distribution. Increase this if you want the randomly generated numbers to be more spread out from Middle Value.
Middle Value
The median of the distribution. Increase this if you want the generated values to be larger and more spread out.
Middle value
The median of the distribution. Increase this if you want the generated values to be larger.
Spread Around Middle
The standard deviation of the distribution. Increase this if you want the randomly generated numbers to be larger and more spread out from Middle Value.
Number of Values
The number of values to choose from when generating the random attribute.
Value
One of the possible values that can be generated.
Weight
The unnormalized probability of the corresponding value being chosen. Increase this if you want a larger chance of the value being selected.
Minimum Limit
If enabled, any generated numbers less than this value, will be set to this value.
This option is only available for the Normal, Exponential, and Log-Normal random distributions.
Maximum Limit
If enabled, any generated numbers greater than this value, will be set to this value.
This option is only available for the Normal, Exponential, and Log-Normal random distributions.
Sorted
If enabled, the contents of the array will be sorted order.
Reversed
If enabled, the contents of the array will be reversed.
Log Data Statistics
If enabled, each work item will log the mean, median, and standard deviation of the generated data. Use this if you want numerical summaries of the generated data and you are okay with a small increase in computation time.
See also |