Rand

Function
This function generates a random field of noise. The field will not resample if you change either the resolution or density, ie, you can animate the density without pixels randomly changing. The seed is set to time by default so that it changes every frame, but you can of course lock this to one value.

Parameters
Type
Defaults
Function
width
int
GetDefaultWidth() width of the image
height
int
GetDefaultHeight() height of the image
bytes
int
1 bit depth, 1, 2, or 4 bytes/channel
density
float
1 The density from 0 to 1 of the pixels. A lower density mean fewer random pixels.
seed
float
time Shake generates a random pattern. The trick for compositing is how to re-create a random pattern a second time? By locking in an initial value, the seed, we can re-construct the same exact random pattern so that your image doesn't change every time you re-render. You can set the value to keep the same pattern, or just put in the keyword time to have every frame be different.


Synopsis

image Rand( 
  int width, 
  int height, 
  int bytes, 
  float density, 
  float seed
);


Script

image = Rand( width, height, bytes, density, seed);


Command Line

shake -rand width height bytes density seed

See Also
Rand, RGrad, Ramp, Color, Checker, ColorWheel