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

20: Fire! (Or something)

Now, this is not a "fire shader", far from it, but it has the general likeness of swirling flames, and it could be tweaked, moved, stretched and warped to create a much better impression of something burning.

This class of patterns, where sums of octaves of noise are warped with the summed-up gradients of successive terms, has great potential for creating passable visual imitations of turbulent flow.

What happens if you warp the coordinates in the opposite direction from the gradient? What if you rotate the gradient 90 degrees and warp in that direction instead? Can you throw in an absolute value or a non-linearity or someting to shake things up a bit? The possibilities are many, but we hope that we have now showed you how the 2-D "psrdnoise" function can be used, and we encourage you to write your own shaders with it!

Oh, right, we promised we would do bump mapping. Hmm. That's really a topic more suited for the 3D version of "psrdnoise", which needs a tutorial of its own, but let's do a simple planar bump mapping with this 2-D function before we part.

	// Text in this pane will be dynamically replaced.