Houdini 11 VEX VEX functions

There are two forms of Perlin-style noise: a non-periodic noise which changes randomly throughout N-dimensional space, and a periodic form which repeats over a given range of space.

1. `float pnoise(float x, int px)`

2. `vector pnoise(float x, int px)`

3. `float pnoise(vector , vector )`

4. `vector pnoise(vector , vector )`

5. `float pnoise(vector4 xyzt, vector4 p)`

6. `vector pnoise(vector4 xyzt, vector4 p)`

7. `float pnoise(float x, float y, int px, int py)`

8. `vector pnoise(float x, float y, int px, int py)`

9. `float pnoise(vector xyz, int px, int py, int pz)`

10. `vector pnoise(vector xyz, int px, int py, int pz)`

11. `float pnoise(vector4 xyzt, int px, int py, int pz, int pt)`

12. `vector pnoise(vector4 xyzt, int px, int py, int pz, int pt)`

There are two forms of Perlin-style noise: a non-periodic noise which changes randomly throughout N-dimensional space, and a periodic form which repeats over a given range of space.

Note

This function generates periodic noise. Use the noise function to generate non-periodic Perlin noise.

The various functions return the noise value at a 4D (vector4 argument), 3D (vector argument), 2D (two float arguments) or 1D (float argument) position. You can get a random float value or a vector of three random values.

The “p” int or vector arguments specify the range of periodicity. For example, if you're making a 2D image and you want it to tile:

```clr = pnoise(X * 4, Y * 5, _4, 5_)
```
In this example, X is in the range 0-4, Y is in the range 0-5, and the noise is periodic within that segment.

Note

If a period argument is 0, VEX treats that as no periodicity. Use this to make the noise periodic in one dimension but not another.

The distribution of the noise depends on the dimension, with higher dimensions approaching a Gaussian distribution of noise values.

See noise and randomness in the VEX language guide for more information.

Contexts: all