K.GEOFFREYSOGAPhD
VEX NOISE

| Home | html / css | Houdini Python
VEX noise() function
The noise() function is Houdini's implementation of Perlin noise. Perlin noise is generated from an underlying n-dimensional lattice, n being typically from one to four. Random gradient vectors are assigned to the lattice points. The noise value at a point is the result of interpolation using the dot product of the distance vectors from the point to the nearest lattice points, and the gradient vectors at those points. As a result of its construction, Perlin noise is a scalar function of position in the n-dimensional space.
scalar noise, scalar parameter
float y = noise( float x );
          
noise
scalar noise, 2D parameter
float y = noise( float x, float z );
          
2D noise
scalar noise, vector3 parameter
Perlin noise can also be generated from an underlying three dimensional grid. That is what happens if the noise() function is called with a vector3 argument. In the following example, I've used displayed noise as a function of the first two components, with time as the third component.
float t = 0.1 * @Frame;
vector v = set(@x,@z,t);
float @y = noise(v);
          
vector noise
vector noise (noise function returning vector)
As mentioned previously, Perlin noise is a scalar noise. Although it may be generated by a grid of any dimension, the noise value created is necessarily scalar. Curiously, Houdini allows for a vector return type for each of the above forms of noise().
vector v = noise( ... );
          
But once you inspect the vector returned, you see it's just the same number copied to each of the three components.
vector v = noise( ... );

// equivalent to

float y = noise( ... );
vector v = set(y,y,y);
          
So it's important to note that Houdini's vector Perlin noise is not really random!. All the vectors generated have random magnitudes, but exactly the same direction.
Cellular Noise
I have a theory of how Houdini cellular noise works. I need a theory because the help documents don't really explain how it works, as least as far as I can tell. So this theory gives me a "functional" understanding of the cellular noise functions. That is, I have a picture in my head of what's going on, and that picture tells me what the noise parameters might be doing. This picture could easily be wrong, but it works well enough for me.
I imagine a set of points randomly scattered through space. These points become the centres of "cells" in the Voronoi sense - all the space that's closer to a given point than to all the others defines a cell belonging to that point. At some position r you can define a function F(r) that has a decreasing value depending on the distance to, say, it's nearest neighbours. You could also add a contribution that's a decreasing function of the distance to the next nearest neighbours, and so on. The more near neighbours that contribute, the more detail gets added to F(r). That's how turbulence could work, with turbulence level corresponding to the levels of nearest neighbours that contribute. Roughness could be increased by increasing the contribution of further neighbours. Attenuation controls how fast F(r) decreases with distance to a cell centre, thereby increasing the "spikiness" of the function.
VEX anoise() function
vector freq = {1,1,1};
vector offset = {0,0,0};
float amp = 1;
int turb = 5;
float rough = 0.5;
float atten = 1;

vector pos = freq*@P - offset;
float y = amp * anoise(pos, turb, rough, atten);
          
These are the parameters and default values for the "turbulent noise" vop. Note, vector multiplication in VEX is component by component. Dot and cross products are separate functions.
turbulence effect
Note that increasing turbulence adds level of detail. The additional detail quickly becomes undetectable at this scale.
roughness effect
Note that increasing attenuation strongly decreases the overall amplitude of the noise. In the following graph, the noise has been normalised by the maximum value, so the effect of attenuation can be more clearly seen.
attenuation effect
Example: Procedural Fire
An example of using the Houdini noise functions is this render of fire, which you can see here. No simulation was required, and no solver has been used. I used the anoise function to create the basic shape of the fire, then added volume wrangles to manipulate a heat and a density field.