TerrainToolkit.VelocityHydraulicErosion
Method
function VelocityHydraulicErosion(iterations : int, rainfall : float, evaporation : float, solubility : float, saturation : float, velocity : float, momentum : float, entropy : float, downcutting : float) : void
Description
Performs velocity hydraulic erosion on the terrain object over a number of iterations.
Velocity hydraulic erosion works similarly to full hydraulic erosion except that it is influenced by a velocity field.
Each iteration, an amount of water equal to rainfall is added to the system as precipitation per iteration. An amount of material equal to solubility and proportional to both the amount of water and the current velocity at that point is dissolved up to a maximum of saturation. Velocity is added at each point proportional to the slope of the terrain at that point and the velocity value. An amount of velocity is transferred into neighbouring cells by moving water equal to momentum. The water flows downhill through the system, carrying any dissoved sediment with it.
At the end of each iteration an amount of water equal to evaporation is removed from the system. When water is evaporated, it leaves behind sedimentary deposits if the the amount of remaining water after evaporation is insufficient to contain the amount of sediment at that point. Also, an amount of velocity defined by entropy is removed from the system.
Each iteration, an amount of additional material proportional to downcutting and the current velocity at that point is removed due to weathering.
Returns
Nothing.
Example
var go : GameObject = GameObject.Find("Terrain");
go.GetComponent("TerrainToolkit").VelocityHydraulicErosion(25, 0.01, 0.5, 0.01, 0.2, 20.0, 1.0, 0.0, 0.1);