|
Sponsored Feature: Procedural Terrain Generation With Fractional Brownian Motion
[The computer graphics industry has a long history of trying to model the limitless complexities of our real world terrain. In this article kicking off Intel's Visual Computing microsite, Freeman demonstrates several techniques (including the source code)
for creating realistic terrain scenes on systems with integrated
graphics solutions.]
Introduction
The computer
graphics industry has a long history of attempting to model real world terrain.
These efforts try to capture the seemingly limitless complexity of natural
terrain through modeling and rendering techniques. As early as the late 1960's
Dr. Benoit Mandelbrot linked natural forms that maintain a level of
self-similarity such as coastlines to mathematical constructs [1]. Notable
achievements in this field since that time have utilized fractals to achieve approximations
of terrain patches using stochastic processes such as fractional Brownian
motion. In this article, we demonstrate several techniques of generating
terrain patches as proposed by Dr. F Kenton Musgrave [2] along with texture
blending and Shader Model 3.0 to create a synthetic scene on integrated
graphics solutions such as the Intel® 965 Express Chipset and Mobile Intel® 965
Express Chipset family.
First, we describe a list of previous work in this field
followed by the approach utilized by our implementation, which leverages both
the CPU and GPU to render the scene. Source code is provided with the
demonstration to be used in your terrain rendering extensions and
implementation.
Previous
Work
A number of
researchers have investigated terrain generation using fractals to perturb
surfaces in 2D and 3D space. B. Mandelbrot provided some of the earliest
representations of terrain generation with fractals by comparing the
self-similarity of mountainous terrain to Brownian motion, resulting in
realistic skylines when charting a 2D random walk. Later work by Mandelbrot and
Musgrave later showed increasingly compelling approximations of terrain
utilizing fractional Brownian motion in 3D space with Perlin noise and the
concept of multifractals both represented in [2].
Noise-based
systems for generating fractal terrains as proposed by [2] and [4] are not
exclusive to creating good approximations to real landscapes as several other
calculations have been used to create aesthetically pleasing approximations to
real terrain. Of interest in this group, include mid-point displacement
calculations including the diamond-square and triangle-edge subdivision
algorithms, Poisson faulting, and Fast Fourier Filtering.
While some of these systems can and do produce realistic looking
scenes, the noise synthesis method proposed in [2] is utilized in this work as
these calculations provide an interesting set of controls to the resulting
terrain from a mathematical model. While these properties do not necessarily
provide a mechanism to definitively control the shape of the rendered scene as
indicated in [5] to constrain terrain to realistic properties, they do provide
many interesting real and imaginative results. We present a CPU based set of
algorithms demonstrating these controls balanced with smooth stepped texture
blending in the pixel shader on the GPU using Microsoft DirectX 9 and Shader
Model 3.0.
Implementation
Our
implementation was inspired by Musgrave's work in [2], showcasing three methods
from that text: simple fBm, hybrid fBm, and the ridged multifractal algorithm,
each based on Perlin's noise algorithm. The output from these methods is used
to perturb the Z direction of a fixed size polygon mesh.
Figure
3-1. Fractal Terrain, Simple fBm
In Figure
3-1, we present our implementation. On the right hand side, one can see the
controls used to adjust properties of each fBm algorithm as selected from the
combo box. Our demo is adapted from the BasicHLSL demo from [7] with default
algorithm parameters adjust to demonstrate interesting terrain properties.
Method
Parameters:
(H) Hurst
index - In mathematical literature, classifies the fBm and dictates fractal
dimension.
(Lacunarity)
- Dictates the gap between successive frequencies.
(Octaves) -
Dictates the number of frequencies and scales Level of Detail in the scene.
(Offset) -
Offset from the lowest elevation and determines "multifractality" [2].
(Gain) -
Controls the amplitude of the frequency.
|
Comments
I just wish the article was longer.
Login to Comment