TerrainToolkit.FastHydraulicErosion

Method


function FastHydraulicErosion(iterations : int, maxSlope : float, falloff : float) : void

Description

Performs fast hydraulic erosion on the terrain object over a number of iterations. Hydraulic erosion removes material from areas with a slope less than maxSlope degrees and deposits it further down the slope. This tends to steepen inclines in the terrain and further smooth and flatten other areas. The effects of erosion are blended out towards zero over a range determined by falloff, where 0.0 results in no falloff and 1.0 results in maximum falloff.

Returns

Nothing.

Example

var go : GameObject = GameObject.Find("Terrain");
go.GetComponent("TerrainToolkit").FastHydraulicErosion(25, 60.0, 0.5);

Texturing

Terrain Toolkit