Friday, August 29, 2008

Tree placement

In addition to the elevations that are read from wavelet-compressed dataset and then refined by fractal algorithm, the engine computes 3 other fractal channels in parallel. These contain 'normal' fractals that will be used as source for coherent random values for various engine parts.

First of these channels was used to enhance the tree placement algorithm. The algorithm in fragment shader first computes the probability of tree being there, according to elevation, slope and terrain curvature. If the actual tree occurrence is determined by comparing the probability against a fixed threshold, it results in large continuous forest areas. The fractal channel provides threshold value that changes continuously and modifies the probability threshold, that results in clearings and woods, but an occasional lonely tree too.

Here is a short video, flying from somewhere in Europe to Africa:

An earlier video without the trees, where angrypig madly flies and turns around
Post a Comment