ABSTRACT

This chapter emphasizes on-the-fly procedural creation of content related to the video games industry. It demonstrates the generating and rendering of infinite and deterministic heightmap-based terrain utilizing fractal Brownian noise calculated in real time on graphics processor units (GPU). The most interesting technique simulates 1/f noise (called "pink noise"). Because this kind of noise occurs widely in nature, it can be easily implemented on modern GPUs and has good performance/speed ratio. Collision detection is managed by copying a GPU-generated heightmap onto an offline surface and reading the height data array. The chapter proposes a random tree distribution algorithm that exploits previously generated terrain information. The tree-placement technique consists of two separate steps. First, the authors generate a tree-density map, which characterizes tree placement. The next step involves rendering instanced tree meshes. Tree-density mapping can be used not only for tree generation but also for other plant seeding systems like grass and bushes.