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

9: Larger animated areas

This is a 16 by 16 sized chunk of "psrdnoise" with the parameter "alpha" varying with time. To the left, alpha varies slowly, and to the left more rapidly.

With a faster animation, it becomes apparent that this is a regular and cyclic animation, with the same pattern reappearing at 2*pi intervals for alpha, and you can even see remnants of the hexagonal grid in the pattern, so some caution is advised when using this parameter for animated patterns. This kind of "lattice gradient noise", defined by small local wiggles in a regular grid, will almost invariably have at least some visual artefacts from the underlying grid. You would usually want to use at least a couple of calls to the noise function and blend the values together in some manner to better hide such regularities.

On the plus side, though, the periodicity of this rotation makes it possible to store it as a pre-rendered sequence of texture images in applications where storage space and memory bandwidth provide better performance than computing the pattern anew every frame.

On that note, one might think that it will of course always be faster to use a stored texture than to compute the value of a noise function for each pixel for each frame, but on a modern desktop GPU, that is no longer the case. Despite the GPU manufacturers' impressive efforts to speed up and parallelize the abundance of texture reads in modern computer graphics, memory access has become a clear bottleneck for massively parallel rendering with thousands of cores. This particular, efficient flavor of 2D noise, with or without animation, now outperforms a single static texture lookup on many systems. What's more, it reads nothing from texture memory, saving memory bandwidth for other rendering tasks in the current scene. If the processing power of the GPU is not already fully utilised, a fully procedural texture like this one can be computed "for free", i.e. executed concurrently with other, more memory-intensive tasks without slowing them down.

Oh, right, this is a tutorial, not a textbook. Sorry. Moving on.

	// Text in this pane will be dynamically replaced.