randomize_direction_array
This compound performs the same function as randomize_direction, but outputs an array of random vectors.
Inputs
Random Properties
size
The size of the output array. This is done by generating n indices for the random value compound internally.
seed
The seed of the random number generator. Different seeds produce different sequences of random values.
Vector Properties
cone_axis
The vector to be rotated. The output is randomly distributed over a spherical cap centered on this vector.
min_radians, max_radians
The minimum and maximum angles to rotate the vector, in radians. For example:
- Setting the minimum to 0 and the maximum to π gives a distribution over the whole sphere.
- Setting the minimum to 0 and the maximum to a value less than π/2 gives a distribution in a conical shape centered on the input vectors.
- Setting the minimum to a value less than π/2 and the maximum to a value between π/2 and π gives a distribution in a belt-like shape around the equator, where the input vectors are the north pole.
Bias
apply_bias
Biases the distribution according to the profile curve.
distribution
Edit the curve to adjust the distribution. Curve values below the diagonal bias toward lower angles, and curve values above the diagonal bias toward higher angles. Curve values outside of the range [0, 1] may give unintuitive results as the values wrap around the sphere.
Outputs
output_vector
The randomly rotated cone_axis vectors. These have the same length as the input, so for example, you can use this output if you want to jitter velocity directions without changing speed.
output_unit_vector
Vectors of length 1 (or very close to 1), with the same direction as the output_vectors output. If your graph computations require unit vectors, use these values to avoid the expense of normalizing the output.
output_quaternion
The quaternion that represents the rotation required to transform cone_axis to output_vectors. Use this output where quaternions are required, for example, to set random orientations on instances or to rotate point positions.
