rand expression function

Returns a pseudo-random number from 0 to 1.

Usage

rand(value)

Using the same value always gives the same result. To vary the result, base the value on a changing number (usually the current frame $F).

rand($F)

When you're randomizing component values (such as X, Y, and Z), change the value for each component so they don’t all get the same number:

X

rand($F)

Y

rand($F * 0.1)

Z

rand($F * 0.01)

Note

It is a good idea to use non-integer values as the argument to rand().