Terrain Erosion Masks
6 nodes
On this page 6
Blur
FunctionGaussian blur with a radius (sigma) in cells, clamped at the borders.
Signature
Blur(map: Scalar Field, sigmaCells: Number) -> Scalar Field
ScalarField2D Blur(ScalarField2D map, double sigmaCells = 1)
Parameters
| name | type | default | description |
|---|---|---|---|
| map | Scalar Field | — | Map to blur. |
| sigmaCells | Number | 1 | Gaussian sigma in cells. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Terrain Erosion Masks
- Package
- Procedural Generation
Exponential Mask
FunctionSaturating ramp for thicknesses (wear, deposition, debris): 1 − exp(−value / scale), so the mask reaches 0.63 at one scale and 0.95 at three.
Signature
ExponentialMask -> Scalar Field
map: Scalar Field
scale: Number
blurCells: NumberScalarField2D ExponentialMask(
ScalarField2D map,
double scale = 0.5,
double blurCells = 0.5)Parameters
| name | type | default | description |
|---|---|---|---|
| map | Scalar Field | — | Raw map, metres. |
| scale | Number | 0.5 | Thickness, metres, at which the mask reaches 0.63. |
| blurCells | Number | 0.5 | Gaussian blur radius (sigma) in cells applied afterwards; 0 for none. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Terrain Erosion Masks
- Package
- Procedural Generation
Linear Mask
FunctionLinear ramp: 0 at or below Low, 1 at or above High.
Signature
LinearMask -> Scalar Field
map: Scalar Field
low: Number
high: Number
blurCells: NumberScalarField2D LinearMask(
ScalarField2D map,
double low = 0,
double high = 1,
double blurCells = 0.5)Parameters
| name | type | default | description |
|---|---|---|---|
| map | Scalar Field | — | Raw map. |
| low | Number | 0 | Value that maps to 0. |
| high | Number | 1 | Value that maps to 1. |
| blurCells | Number | 0.5 | Gaussian blur radius (sigma) in cells applied afterwards; 0 for none. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Terrain Erosion Masks
- Package
- Procedural Generation
Logarithmic Mask
FunctionLogarithmic ramp for quantities spanning orders of magnitude (drainage area, sediment flux): 0 at or below Low, 1 at or above High.
Signature
LogarithmicMask -> Scalar Field
map: Scalar Field
low: Number
high: Number
blurCells: NumberScalarField2D LogarithmicMask(
ScalarField2D map,
double low = 1000,
double high = 10000000,
double blurCells = 0.5)Parameters
| name | type | default | description |
|---|---|---|---|
| map | Scalar Field | — | Raw map with positive values. |
| low | Number | 1000 | Value that maps to 0. |
| high | Number | 10000000 | Value that maps to 1. |
| blurCells | Number | 0.5 | Gaussian blur radius (sigma) in cells applied afterwards; 0 for none. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Terrain Erosion Masks
- Package
- Procedural Generation
Percentile Mask
FunctionRamp between two percentiles of the map itself. This adapts to the terrain, so the same value can mean different things on different maps; prefer the fixed conversions for anything that must stay consistent.
Signature
PercentileMask -> Scalar Field
map: Scalar Field
lowPercentile: Number
highPercentile: Number
logarithmic: Truth
blurCells: NumberScalarField2D PercentileMask(
ScalarField2D map,
double lowPercentile = 0.02,
double highPercentile = 0.98,
bool logarithmic = false,
double blurCells = 0.5)Parameters
| name | type | default | description |
|---|---|---|---|
| map | Scalar Field | — | Raw map. |
| lowPercentile | Number | 0.02 | Percentile (0..1) that maps to 0. |
| highPercentile | Number | 0.98 | Percentile (0..1) that maps to 1. |
| logarithmic | Truth | False | Ramp in log space, for area and flux maps. |
| blurCells | Number | 0.5 | Gaussian blur radius (sigma) in cells applied afterwards; 0 for none. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Terrain Erosion Masks
- Package
- Procedural Generation
Signed Mask
FunctionDiverging ramp for signed maps (height change): 0.5 at zero, 0 at −Range and 1 at +Range.
Signature
SignedMask -> Scalar Field
map: Scalar Field
range: Number
blurCells: NumberScalarField2D SignedMask(
ScalarField2D map,
double range = 10,
double blurCells = 0.5)Parameters
| name | type | default | description |
|---|---|---|---|
| map | Scalar Field | — | Raw signed map. |
| range | Number | 10 | Magnitude that maps to 0 or 1. |
| blurCells | Number | 0.5 | Gaussian blur radius (sigma) in cells applied afterwards; 0 for none. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Terrain Erosion Masks
- Package
- Procedural Generation