2-D PSRDnoise tutorial

Page 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21

Frame rate: FPS

10: Animated fractal sum

This pattern is a "fractal sum" of several alpha-animated noise components with different feature sizes. This is one of the most common uses of noise, and now the slightly regular structure of the grid and the cyclic animation with "alpha" are completely masked by the emergent complexity of the "fractal cloud" pattern.

Note that we add different small offsets to the scaled texture coordinates for each of the noise components, the "octaves". This is because we don't want the grid points to coincide between components. In that case, some points would always have the value zero. This is mostly inconsequential to the general look of the fractal sum, but in some circumstances it creates a less random-looking pattern.

Note also that the animation of "alpha" is slower for large features, and faster for small features. This mimics the behavior of turbulent flow, where small swirls spin faster than large swirls because of the physics involved, and it creates a "natural" (or, rather, "believable") look for the overall animation.

The pattern is cyclic and repeats with every 4*pi seconds. If this is not what you want, you can change the rotation speeds for alpha to not be even multiples of each other. Put some irrational numbers in there, and the pattern will never repeat itself.

And, just for fun, we made the pattern periodic again in (x,y). Every component repeats across the edges of this visible square, so their sum repeats as well.

If you don't care for a repeating texture, set the components of "p" to 0.0 and let the noise roam free across the plane. Additionally, consider using scale factors between "octaves" that are not exactly powers of two. Non-integer scale factors are less prone to create accidental regularity in the final pattern.

	// Text in this pane will be dynamically replaced.