I to be replaced by arbitrary values for each I.The following shows increasing harmonics of 1 dimen=perlin noise along with the sum of the first 8 harmonics at the bottom. in this case a and B are both equal to 2. note that since in practice we only ever add a limited number of harmonics, if we zoom into this function sufficiently it will become smooth.
2 dimensional
The following show the same progression but in two dimensions. this is also a good example of why one doesn't have to sum to large values of N, after the 4th harmonic the values are less than the resolution of a gray scale image both in terms of spatial resolution and the resolution of 8 bit gray scale.
0 (1) |
1 (2) |
2 (4) |
3 (8) |
4 (16) |
Sum |
As earlier, A and B are both set to 2 but note that there are an infinite number of ways these harmonics cocould be added together to create different effects. for example, if in the above case one wanted more of the second harmonic then the scaling of that can be increased. while the design of a particle image/texture isn't difficult it does take some practice to become proficient.
3 dimencript
Perlin Noise can be created in 3D and higher dimensions, unfortunately it is harder to visualise the result in the same way as the earlier dimensions. one isosurface of the first two harmonics are shown below but it hardly tells the whole story since each point in space has a value assigned to it.
Perhaps the most common use of 3D Perlin Noise is generating volumetric textures, that is, textures that can be evaluated at any point in space instead of just on the surface. there are a number of reasons why this is desirable.
It means that the texture need not be created beforehand but can be computed on the fly.
There are a number of ways the texture can be animated. one way to translate the 3 dimenvelpoint passed to the noise () function, alternatively one can rotate the points. since the 3D texture is defined everywhere in 3D space, this is equivalent to translating or rotating the texture volume.
The exact appearance of the texture can be controlled by either varying the relative scaling of the harmonics or by adjusting how the scalar from the Perlin functions is mapped to color and/or transparency.
It gets around the problem of mapping rectangular texture images onto topologically different surfaces. for example, the following texture for a sun was created using 3D noise and evaluating the points using the same mapping as will be used when the texture is mapped onto a sphere. the result is that the texture will map without pinching at the poles and there will not be any seams on the left and right.
Source code The original C code by Ken Perlin is given here: Perlin. h and Perlin. C. Applications The above describes a way of creating a noisy but continuous function. in normal operation one passes a vector in some dimension and the function returns a scalar. how this scalar is used is the creative part of the process. often it is can be used directly, for example, to move the limbs of virtual character so they aren't rigid looking. or it might be used directly as the transparency function for clouds. another fairly common application is to use the 1D noise to perturb lines so they look more natural, or to use the 2D noise as the height for terrain models. 2D and 3D Perlin Noise are often used to create clouds, a hint of this can be seen in the sum of the 2D noise () functions abve. When the aim is to create a texture the scalar is used as an index into a color map, this may either be a continuous function or a lookup table. creating the color map to achieve the result being sought is a matter of skill and experience. another approach is to use noise () functions as arguments to other mathematical funical, for example, marble effects are often made using cos (x + noise (x, y, z )) and mapping that to the desired marble colours. |
|
|
In order to adjust tively map the values returned from the noise functions one needs to know the range of values and the distribution of values returned. the original functions and therefore the ones presented here both have Gaussian like distributions centered on the origin. noise () returns values between about-0.7 and 0.7 while noise () returns values potentially between-1 and 1. the two distributions are shown below.
The possibilities are endless, enjoy experimenting.
References
Ken Perlin
An image Synthesizer
Computer Graphics, 1985, 19 (3), pp 287-296.
Donald Hearn and M. Pauline Baker
Fractal-geometry Methods
Computer Graphics, C-version, 1997, pp 362-378.
Perlin, K
Live paint: painting with procedural multiscale textures
Computer Graphics, volume 28, number 3.
David Ebert, et al (chapter by Ken Perlin)
Texturing and modeling, a procedural approach
AP professional, Cambridge, 1994.
Perlin, K., Hoffert, E.
Hypertexture
Computer Graphics (Proceedings of ACM Siggraph Conference), 1989, vol. 22, No. 3.