On this page |

## Noise generators

You can generate noise with the noise, wnoise, vnoise, onoise, snoise, and anoise functions.

Each represents a different algorithm for generating noise. This allows you to make speed tradeoffs between different methods, as well as ensure comparability with noise values generated through other or older methods.

The relative costs for computing noise of different types is roughly:

Noise type | Relative cost |
---|---|

Perlin noise (noise) |
1.0 |

Original perlin noise (onoise) |
1.1 |

Worley noise (wnoise) |
1.8 |

Sparse Convolution noise (snoise) |
2.1 |

Alligator noise (anoise) |
2.3 |

## Random number generators

random generates a random number based on the position
in N dimensional space (where N is 1 to 4 dimensions). Unlike the
noise functions which smoothly interpolate the random values between
integer lattice points, the random functions do not. The random()
functions are very efficient ways of doing something like:
`noise(floor(position))`

hscript_rand produces the exact same results as the Houdini rand() expression. This function will generate different random values for every floating point seed. This is different from random which converts the floating point argument to an integer seed. hscript_rand may produce different results on different hardware or operating systems.

nrandom is a non-deterministic random number generator. Numbers generated will be between 0 and 1. These functions will generate the same sequence of random numbers if called in precisely the same order. However, there is no seed involved so it is not possible to reproduce the same random number or sequence multiple times.