Material Fundamentals

Noise Functions

In 3D, we are interested in noise pattern that are predictable and repeatable. We also need a function that will return a noise value according to a 3D coordinate. And furthermore, at any given 3D point in space, this function should return a noise value which is consistent with any other nearby 3D points in space. Nearby being very dependent on the scale of the texture itself and on the scale of the object on which the texture is applied and on the proximity of the camera to the textures surface. Imagine a camera which zooms onto a textured surface. The surface distance between each rendered pixel will vary widely. Nevertheless, the rendered texture will still look consistent from frame to frame. For these reasons, we can't use regular random numbers in CG. We want noise functions where the noise characteristics are well known, predetermined, predictable and with nice smooth changes from one value to the previous one. So we must use special kind of noise functions which are not random at all but are designed to look random as much as possible.

Noise functions are precomputed 3D grid of values with nice smooth interpolation between the grid values. Noise function where invented by Ken Perlin. For a brief introduction to these noise functions, I invite you to take a look at the inventor of those functions web site: Ken Perlin and his presentation on Noise Functions.

To see what the Noise function looks like, simply slap a Fractal Sum turbulence onto a square patch, leave the Octave at 1 and set the first attribute to white, the second attribute to black and render.

A noise function is designed to return a value between 0 and 1. In the black and white Fractal Sum render we just did, the black spots represent a value of 0 and the white spots represent a value of 1 and any in-between grays represent values between 0 and 1. In a combiner, those values are used to separate or mix the child attributes. A value of 0 will use only the bottom attribute and a value of 1 only the top attribute and any in-between values will result in a mix of both attributes. When the attributes are simple colors, you get color mixes but each attributes could be further defined as material trees and thus would result un mixing complex textures.A FractalSum of 1 Octave can barely be described as Noise. The transition from values to values are way too smooth and if you reduce the scale of the material, you start perceiving the underlying grid patterns in the texture. In CG, we kind of defeat this regular pattern by fractalizing it which is what we do when we increase the octave number.

Next: The Octave