Value Noise
Algorithms produce output that is too perfect. Look at the colors and shapes in the renderers we've written. You can smell the math behind them. When we explore the physical world, we see splotches, cracks, and wobbles. How do we mimic these imperfections in our algorithmic output? Let's try disrupting the perfection with randomness.
We might try generating a random texture with this algorithm:
for each row r
for each column c
texels[c, r] = random
for each row r
for each column c
texels[c, r] = randomThis algorithm produces value noise, which means we generate random numbers and use them directly as the texture values. Not just any randomness will do, however. Some randomness is pure chaos. We wouldn't, for example, use this texture for a terrain or a specular map because it is too wild:
This texture is an example of white noise, which means each texel's value is chosen independently, without regard for its neighbors, and the distribution is uniform. White noise is incoherent.
The chaos of white noise can be tamed a bit by interpolating between texels. Use the controls in the renderer above to linearly interpolate the noise. Even with linear interpolation, we still see a fair amount of chaos and a distracting number of axis-aligned streaks. Increasing the resolution doesn't help.
Coherent and organic noise is possible. One approach is to generate a pyramid of white noise textures and blend them together following this algorithm:
- Generate an \(m \times n\) white noise texture. Then generate an \(\frac{m}{2} \times \frac{n}{2}\) white noise texture. Then generate an \(\frac{m}{4} \times \frac{n}{4}\) white noise texture. And so on, for the desired number of levels. Each level of this pyramid is an octave.
- Rescale all levels to be \(m \times n\) using linear interpolation to smooth out the magnification.
- Weight each level. The first level, with the finest original resolution, is given the least weight, and the last level, with the coarsest resolution, is given the greatest.
- Add the images together.
This mixing together of different resolutions of randomness results in fractal noise. Use this renderer to build your own fractal noise with this algorithm:
The smoothness of the noise is determined by the number of octaves in the pyramid. Each octave is half the resolution of its preceding octave. If we expand the pyramid to its full extent, we'll hit a 1×1 image.
The weights are carefully crafted to sum to 1. Since the lowest-resolution level is given a weight of approximately 0.5, it dominates the accumulated texture. The higher-resolution levels are given less weight, so they contribute fine detail. If we desire a noise that is rough and grainy, we should stop short of the coarse low-resolution levels.
Fractal noise is certainly an improvement over white noise. But if we examine enough samples of it, we start to see subtle artifacts. In particular, we still find streaks of homogeneity. Consider this sample, which contains a few such streaks of both light and dark intensity:

These streaks are always oriented along the horizontal and vertical axes, which makes them stick out. Sometimes they cross and produce glaring plus signs. To eliminate them, we must abandon value noise.