Class TCastleTerrainNoise
Unit
Declaration
type TCastleTerrainNoise = class(TCastleTerrainData)
Description
Terrain heights are generated from a smooth noise, combined with some terrain-specific improvements (Heterogeneous).
We take the noise (integer noise, i.e. hash), smooth it (how well, and how fast — see Interpolation and Blur), and add several functions ("octaves") of such noise (with varying frequency and amplitude) together. This is the kind of noise used to synthesize textures, terrains and all other procedural stuff.
For more info about math inside:
[http://en.wikipedia.org/wiki/Fractional_Brownian_motion]. This is the idea of summing up octaves of noise. Ken Musgrave's dissertation has a lot of info and interesting references: [http://www.kenmusgrave.com/dissertation.html]
Blender's source code is informative, interesting file is blender/source/blender/blenlib/intern/noise.c
The simplest practical introduction to the idea is on [http://freespace.virgin.net/hugo.elias/models/m_perlin.htm]. It describes how to get nice noise very easily, and my approach follows theirs.
Source: scene/castleterrain.pas (line 255).
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleComponent
- TCastleTerrainData
- TCastleTerrainNoise
Generated by PasDoc 0.17.0.snapshot.