R

RandomValueNode

Associated Parameters: RandomValueNode

Introduced

7.0

UI Location

• Math > Basic

Description

Generates a random value within a range of the specified mean value. The Distribution Type parameter allows you to specify the distribution:

- Uniform: every value within the variance range is equally likely to be generated.

- Gaussian (also known as bell curve distribution): values close to the mean value are more likely to be generated. The likelihood smoothly diminishes as values are further from the mean.

- Triangle: the likelihood diminishes linearly as values are further from the mean.

- Profile Curve: allows you to sculpt the distribution. The zero x value of the curve corresponds to the mean, while -1 and 1 the limit of the distribution specified by the variance. The curve's values outside of this range are ignored.

The random value can generate many value types. For some types, the there can be several ways to generate such values. Here is how the generation of values of special types is handled:

- 2D, 3D and 4D vectors: generates random scalars for each of the components of the vector (x, y, ...). This generates a square distribution range.

- Rotation, quaternion and 3x3 matrix: generates random values that represent random rotations evenly distributed on a sphere.

- 4x4 matrix: generates a matrix that represents a random rotation evenly distributed on a sphere, a random scaling and translation.

- Boolean: generates a random boolean (true or false) similar to a flip of a coin. The mean and variance have no effect on this type.

- Color: generates a color with random red, green and blue channels. The alpha channel is not randomized and is equal to the alpha value of the mean color.

Note: The generation of random values for some of these types is arbitrary. You can define other methods of generating random values by combining these results. For example, you can generate a random 3D vector by rotating a unit vector with a random rotation.

Parameters

Parameter Name

Scripting Name

Type

Description

Distribution Type

distributiontype

Integer

The type of distribution of the random values generated.

Possible Values:

0: Uniform

1: Gaussian

2: Triangle

3: Profile Curve

Profile

profile

0

Profile used to modulate the input

Port Description

Inputs

Group ID

Instances

Port Name

Connection Info

Description

0

1

seed

Type: siICENodeDataLong

Structure: siICENodeStructureSingle

Context: siICENodeContextSingleton

The seed defines the sequence of random numbers generated. If you require that two Random Value nodes generate a different set of random values, simply assign them different seed values.

timevarying

Type: siICENodeDataBool

Structure: siICENodeStructureSingle

Context: siICENodeContextSingleton

True to generate a new set of random numbers at each frame. Otherwise, the same numbers are always returned when the current time changes.

id

Type: siICENodeDataLong

Structure: siICENodeStructureAny

Context: siICENodeContextAny

This is the index of the random value in the random value sequence to be returned. Typically, if you want a unique random number for each point of a polygon mesh, for example, connect the index of the component processed to this node. This index can be retrieved with the Get Element Indices node. For point clouds, since some points can be added and deleted at each frame, the index of a point is not unique over time. For this case, it is better to use the ID attribute on the points of the point cloud by connecting a Get Data node on "Self.ID" to the ID port.

meanvalue

Type: siICENodeDataValue

Structure: siICENodeStructureAny

Context: siICENodeContextAny

The value around which the random values will be generated. Generating scalar values with mean value 2.3 and variance 10.0 will return values ranging between -7.7 and 12.3. If the distribution is gaussian or triangular, then values closest to 2.3 are more likely to occur.

variance

Type: siICENodeDataFloat

Structure: siICENodeStructureAny

Context: siICENodeContextAny

Specifies the range in which the random values will be generated. The variance is a distance from the mean value.

Outputs

Port Name

Connection Info

Description

value

Type: siICENodeDataValue

Structure: siICENodeStructureAny

Context: siICENodeContextAny

The random value generated.

Restrictions

• These types must match: meanvalue, value

• These structures must match: id, meanvalue, variance, value

• These contexts must match: id, meanvalue, variance, value

See Also

TurbulenceNode



Autodesk Softimage v7.5