Heightmap Operations
63 nodes
On this page 63
Add
FunctionThis node carries no documentation.
Overload 1 of 2
Add(source: Scalar Field, value: Number) -> Scalar Field
ScalarField2D Add(ScalarField2D source, double value)
Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| value | Number | — |
Returns
| result | Scalar Field |
Overload 2 of 2
Add(a: Scalar Field, b: Scalar Field) -> Scalar Field
ScalarField2D Add(ScalarField2D a, ScalarField2D b)
Parameters
| name | type | default | description |
|---|---|---|---|
| a | Scalar Field | — | |
| b | Scalar Field | — |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Add In Place
FunctionThis node carries no documentation.
Overload 1 of 2
AddInPlace(target: Scalar Field, value: Number)
void AddInPlace(ScalarField2D target, double value)
Parameters
| name | type | default | description |
|---|---|---|---|
| target | Scalar Field | — | |
| value | Number | — |
Overload 2 of 2
AddInPlace(target: Scalar Field, value: Scalar Field)
void AddInPlace(ScalarField2D target, ScalarField2D value)
Parameters
| name | type | default | description |
|---|---|---|---|
| target | Scalar Field | — | |
| value | Scalar Field | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Apply Curve
FunctionThis node carries no documentation.
ApplyCurve -> Scalar Field
source: Scalar Field
curve: Func<Number, Number>ScalarField2D ApplyCurve(
ScalarField2D source,
Func<double, double> curve)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| curve | Func<Number, Number> | — |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Apply Masks
FunctionApplies a series of HeightmapMasks to the Heightmap using a specified modification function.
ApplyMasks
source: Scalar Field
masks: Scalar Field Array
modification: Func<Number, Number, Number, Number, Number>void ApplyMasks(
ScalarField2D source,
ScalarField2D[] masks,
Func<double, double, double, double, double> modification)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| masks | Scalar Field Array | — | Array of HeightmapMasks to apply. |
| modification | Func<Number, Number, Number, Number, Number> | — | Function that modifies the height based on the mask value and coordinates. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Blend
FunctionThis node carries no documentation.
Blend -> Scalar Field
a: Scalar Field
b: Scalar Field
mode: Scalar Field Blend Operation
weight: NumberScalarField2D Blend(
ScalarField2D a,
ScalarField2D b,
ScalarField2DBlendOperation mode,
double weight = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| a | Scalar Field | — | |
| b | Scalar Field | — | |
| mode | Scalar Field Blend Operation | — | |
| weight | Number | 1 |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Blend Height Mask
FunctionCreates a modified copy of a heightmap by applying a grayscale height mask using the specified blend mode.
BlendHeightMask -> Scalar Field
source: Scalar Field
heightsMask: Pixel Image
startHeight: Number
maxHeight: Number
mode: TerrainBlendMaskApplicationModeScalarField2D BlendHeightMask(
ScalarField2D source,
PixelImage heightsMask,
double startHeight,
double maxHeight,
TerrainBlendMaskApplicationMode mode)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | The source heightmap to blend. |
| heightsMask | Pixel Image | — | The pixel image used as the height mask. Its dimensions must match the source heightmap. The red channel is interpreted as the mask value, where 0 maps to Start Height and 255 maps to Max Height. |
| startHeight | Number | — | The target height represented by a mask value of 0. |
| maxHeight | Number | — | The target height represented by a mask value of 255. |
| mode | TerrainBlendMaskApplicationMode | — | The mode used to apply the computed target height to each source height. |
Returns
| result | Scalar Field |
Remarks
This method returns a cloned heightmap and does not modify Source.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Blend Masked
FunctionThis node carries no documentation.
BlendMasked -> Scalar Field
a: Scalar Field
b: Scalar Field
mask: Scalar FieldScalarField2D BlendMasked(
ScalarField2D a,
ScalarField2D b,
ScalarField2D mask)Parameters
| name | type | default | description |
|---|---|---|---|
| a | Scalar Field | — | |
| b | Scalar Field | — | |
| mask | Scalar Field | — |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Calculate Flow Accumulation Map
FunctionCalculates routed rainfall accumulation across the terrain.
CalculateFlowAccumulationMap -> Scalar Field
terrain: Scalar Field
precipitation: Scalar Field
rainfallScale: Number
routingMode: ScalarField2DHydrology.FlowRoutingMode
mfdExponent: Number
usePhysicalScale: TruthScalarField2D CalculateFlowAccumulationMap(
ScalarField2D terrain,
ScalarField2D precipitation,
double rainfallScale = 1,
ScalarField2DHydrology.FlowRoutingMode routingMode = FlowRoutingMode.MultipleFlowDirection,
double mfdExponent = 1.1,
bool usePhysicalScale = true)Parameters
| name | type | default | description |
|---|---|---|---|
| terrain | Scalar Field | — | Source terrain. |
| precipitation | Scalar Field | — | Optional rainfall/intensity map. Null means uniform rainfall. |
| rainfallScale | Number | 1 | Global multiplier for rainfall contribution. |
| routingMode | ScalarField2DHydrology.FlowRoutingMode | Multiple flow direction | Flow routing model. |
| mfdExponent | Number | 1.1 | Multiple-flow-direction concentration exponent. |
| usePhysicalScale | Truth | True | If true, accumulation uses PhysicalScale as world area. If false, accumulation uses cell count. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Calculate Height Change
FunctionThis node carries no documentation.
CalculateHeightChange(source: Scalar Field) -> Scalar Field
ScalarField2D CalculateHeightChange(ScalarField2D source)
Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Calculate Height Change Normalized
FunctionCalculates pixel-space gradient magnitude and normalizes the result to 0-1.
Does not use PhysicalScale.
CalculateHeightChangeNormalized(source: Scalar Field) -> Scalar Field
ScalarField2D CalculateHeightChangeNormalized(ScalarField2D source)
Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — |
Returns
| result | Scalar Field |
Remarks
This measures height change per heightmap cell, then normalizes by the strongest local gradient in the map.
0 = flat, 1 = steepest point in this map.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Calculate Normal Based Steepness
FunctionCalculates normal-derived steepness.
Range: 0 to 1.
0 = flat, 1 = vertical.
Uses PhysicalScale by default.
CalculateNormalBasedSteepness -> Scalar Field
source: Scalar Field
usePhysicalScale: TruthScalarField2D CalculateNormalBasedSteepness(
ScalarField2D source,
bool usePhysicalScale = true)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| usePhysicalScale | Truth | True |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Calculate Normals
FunctionThis node carries no documentation.
CalculateNormals -> Vector3 Array Array
source: Scalar Field
heightScale: NumberVector3[][] CalculateNormals(
ScalarField2D source,
double heightScale = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| heightScale | Number | 1 |
Returns
| result | Vector3 Array Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Calculate Physical Height Change
FunctionThis node carries no documentation.
CalculatePhysicalHeightChange(source: Scalar Field) -> Scalar Field
ScalarField2D CalculatePhysicalHeightChange(ScalarField2D source)
Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Calculate Physical Height Change Normalized
FunctionCalculates world-space gradient magnitude and normalizes the result to 0-1.
Uses PhysicalScale.
CalculatePhysicalHeightChangeNormalized(source: Scalar Field) -> Scalar Field
ScalarField2D CalculatePhysicalHeightChangeNormalized(ScalarField2D source)
Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — |
Returns
| result | Scalar Field |
Remarks
This measures height change per real-world horizontal unit, then normalizes by the strongest local physical gradient in the map.
0 = flat, 1 = steepest point in this map.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Calculate Slope Angle Degrees
FunctionCalculates slope angle in degrees.
Range: 0 to 90.
Uses PhysicalScale by default, so the result represents real terrain angle.
CalculateSlopeAngleDegrees -> Scalar Field
source: Scalar Field
usePhysicalScale: TruthScalarField2D CalculateSlopeAngleDegrees(
ScalarField2D source,
bool usePhysicalScale = true)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| usePhysicalScale | Truth | True |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Calculate Slope Angle Radians
FunctionCalculates slope angle in radians.
Range: 0 to PI / 2.
Uses PhysicalScale by default, so the result represents real terrain angle.
CalculateSlopeAngleRadians -> Scalar Field
source: Scalar Field
usePhysicalScale: TruthScalarField2D CalculateSlopeAngleRadians(
ScalarField2D source,
bool usePhysicalScale = true)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| usePhysicalScale | Truth | True |
Returns
| result | Scalar Field |
Remarks
A heightfield slope angle is normally 0 to PI / 2, not 0 to PI.
0 = flat, PI / 2 = vertical.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Calculate Slope Map
FunctionCalculates a derived slope/steepness map from a heightmap.
CalculateSlopeMap -> Scalar Field
source: Scalar Field
slopeMapType: Slope Map TypeScalarField2D CalculateSlopeMap(
ScalarField2D source,
ScalarField2D.SlopeMapType slopeMapType = SlopeMapType.NormalBasedSteepness)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | Source heightmap. |
| slopeMapType | Slope Map Type | Normal based steepness | Slope/steepness representation to calculate. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Calculate Topographic Wetness Index Map
FunctionCalculates raw Topographic Wetness Index from routed flow accumulation and terrain slope.
CalculateTopographicWetnessIndexMap -> Scalar Field
terrain: Scalar Field
precipitation: Scalar Field
rainfallScale: Number
routingMode: ScalarField2DHydrology.FlowRoutingMode
mfdExponent: Number
slopeEpsilon: Number
usePhysicalScale: TruthScalarField2D CalculateTopographicWetnessIndexMap(
ScalarField2D terrain,
ScalarField2D precipitation,
double rainfallScale = 1,
ScalarField2DHydrology.FlowRoutingMode routingMode = FlowRoutingMode.MultipleFlowDirection,
double mfdExponent = 1.1,
double slopeEpsilon = 1E-06,
bool usePhysicalScale = true)Parameters
| name | type | default | description |
|---|---|---|---|
| terrain | Scalar Field | — | Source terrain. |
| precipitation | Scalar Field | — | Optional rainfall/intensity map. Null means uniform rainfall. |
| rainfallScale | Number | 1 | Global multiplier for rainfall contribution. |
| routingMode | ScalarField2DHydrology.FlowRoutingMode | Multiple flow direction | Flow routing model. |
| mfdExponent | Number | 1.1 | Multiple-flow-direction concentration exponent. |
| slopeEpsilon | Number | 1E-06 | Minimum slope used to avoid division by zero and extreme flat-terrain values. |
| usePhysicalScale | Truth | True | If true, flow and slope use terrain PhysicalScale. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Calculate Wetness Mask
FunctionCreates an artist-friendly 0-1 wetness mask from Topographic Wetness Index percentiles.
CalculateWetnessMask -> Scalar Field
terrain: Scalar Field
precipitation: Scalar Field
wetness: Number
routingMode: ScalarField2DHydrology.FlowRoutingMode
mfdExponent: Number
slopeEpsilon: Number
dryPercentile: Number
wetPercentile: Number
contrast: Number
usePhysicalScale: TruthScalarField2D CalculateWetnessMask(
ScalarField2D terrain,
ScalarField2D precipitation,
double wetness = 1,
ScalarField2DHydrology.FlowRoutingMode routingMode = FlowRoutingMode.MultipleFlowDirection,
double mfdExponent = 1.1,
double slopeEpsilon = 1E-06,
double dryPercentile = 0.02,
double wetPercentile = 0.98,
double contrast = 1,
bool usePhysicalScale = true)Parameters
| name | type | default | description |
|---|---|---|---|
| terrain | Scalar Field | — | Source terrain. |
| precipitation | Scalar Field | — | Optional rainfall/intensity map. Null means uniform rainfall. |
| wetness | Number | 1 | Overall wetness multiplier. |
| routingMode | ScalarField2DHydrology.FlowRoutingMode | Multiple flow direction | Flow routing model. |
| mfdExponent | Number | 1.1 | Multiple-flow-direction concentration exponent. |
| slopeEpsilon | Number | 1E-06 | Minimum slope used in the TWI calculation. |
| dryPercentile | Number | 0.02 | TWI percentile mapped to 0. |
| wetPercentile | Number | 0.98 | TWI percentile mapped to 1. |
| contrast | Number | 1 | Centered contrast applied to the final wetness mask. |
| usePhysicalScale | Truth | True | If true, flow and slope use terrain PhysicalScale. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Clamp
FunctionThis node carries no documentation.
Clamp -> Scalar Field
source: Scalar Field
min: Number
max: NumberScalarField2D Clamp(
ScalarField2D source,
double min = 0,
double max = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| min | Number | 0 | |
| max | Number | 1 |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Clamp In Place
FunctionThis node carries no documentation.
ClampInPlace(heightmap: Scalar Field, min: Number, max: Number)
void ClampInPlace(
ScalarField2D heightmap,
double min = 0,
double max = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| heightmap | Scalar Field | — | |
| min | Number | 0 | |
| max | Number | 1 |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Clone
FunctionThis node carries no documentation.
Clone(source: Scalar Field) -> Scalar Field
ScalarField2D Clone(ScalarField2D source)
Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Combine Masks
FunctionCombines multiple Heightmap masks (value range 0-1) into a single union mask.
CombineMasks(masks: Scalar Field Array) -> Scalar Field
ScalarField2D CombineMasks(ScalarField2D[] masks)
Parameters
| name | type | default | description |
|---|---|---|---|
| masks | Scalar Field Array | — | An array of Heightmap masks to combine. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Contrast
FunctionAdjusts height contrast relative to the current elevation range.
Contrast -> Scalar Field
source: Scalar Field
contrast: Number
pivot: Number
clampToRange: TruthScalarField2D Contrast(
ScalarField2D source,
double contrast = 1,
double pivot = 0.5,
bool clampToRange = true)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | Source heightmap. |
| contrast | Number | 1 | Contrast factor. 0 flattens to pivot, 1 is unchanged, values greater than 1 increase contrast. |
| pivot | Number | 0.5 | Normalized pivot inside the current range. 0.5 means midpoint. |
| clampToRange | Truth | True | Clamp result back to the original elevation range. |
Returns
| result | Scalar Field |
Remarks
Preserves the original min/max when Clamp To Range == true. With Clamp To Range == false, it can overshoot beyond the original field range, which may be useful for procedural amplification before a later HeightmapOperations.Normalize, HeightmapOperations.Clamp, or blend step.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Contrast In Place
FunctionAdjusts height contrast relative to the current elevation range.
ContrastInPlace
heightmap: Scalar Field
contrast: Number
pivot: Number
clampToRange: Truthvoid ContrastInPlace(
ScalarField2D heightmap,
double contrast = 1,
double pivot = 0.5,
bool clampToRange = true)Parameters
| name | type | default | description |
|---|---|---|---|
| heightmap | Scalar Field | — | Target heightmap. |
| contrast | Number | 1 | Contrast factor. 0 flattens to pivot, 1 is unchanged, values greater than 1 increase contrast. |
| pivot | Number | 0.5 | Normalized pivot inside the current range. 0.5 means midpoint. |
| clampToRange | Truth | True | Clamp result back to the original elevation range. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Create Forest Mask
FunctionCreates a forest suitability mask.
Selects non-water terrain with acceptable slope and enough local flatness for larger vegetation.
CreateForestMask -> Scalar Field
terrain: Scalar Field
waterMask: Scalar Field
excludeWater: Truth
maxSlopeDegrees: Number
slopeFalloffDegrees: Number
flatRadius: Integer
maxLocalRelief: Number
localReliefFalloff: Number
clusterMask: Scalar Field
clusterStrength: Number
clusterRadius: Integer
clusterContrast: Number
usePhysicalUnits: Truth
isNormalized: Truth
recessionFromWater: NumberScalarField2D CreateForestMask(
ScalarField2D terrain,
ScalarField2D waterMask,
bool excludeWater = true,
double maxSlopeDegrees = 32,
double slopeFalloffDegrees = 12,
int flatRadius = 4,
double maxLocalRelief = 0.04,
double localReliefFalloff = 0.06,
ScalarField2D clusterMask,
double clusterStrength = 0.65,
int clusterRadius = 8,
double clusterContrast = 1.5,
bool usePhysicalUnits = true,
bool isNormalized = true,
double recessionFromWater = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| terrain | Scalar Field | — | Source terrain. |
| waterMask | Scalar Field | — | Optional 0-1 water mask. If null and excludeWater is true, one is generated. |
| excludeWater | Truth | True | If true, water areas are suppressed. |
| maxSlopeDegrees | Number | 32 | Slope angle where forest suitability remains fully allowed. |
| slopeFalloffDegrees | Number | 12 | Slope fade range above maxSlopeDegrees. |
| flatRadius | Integer | 4 | Neighborhood radius in cells used to test local relief. |
| maxLocalRelief | Number | 0.04 | Maximum local height range considered fully suitable. If isNormalized is true, this is interpreted as 0-1 of the terrain elevation range. Otherwise it is interpreted in terrain height units. |
| localReliefFalloff | Number | 0.06 | Fade range above maxLocalRelief. If isNormalized is true, this is interpreted as 0-1 of the terrain elevation range. Otherwise it is interpreted in terrain height units. |
| clusterMask | Scalar Field | — | Optional 0-1 modulation mask/noise for clustered forest placement. |
| clusterStrength | Number | 0.65 | 0 ignores clustering, 1 fully applies cluster suppression. |
| clusterRadius | Integer | 8 | Smooth radius used to favor larger connected forest patches. |
| clusterContrast | Number | 1.5 | Contrast applied to the clustered suitability mask. Values greater than 1 make clusters tighter. |
| usePhysicalUnits | Truth | True | Use terrain PhysicalScale for slope, hydrology, and water recession distance calculations. |
| isNormalized | Truth | True | If true, local relief thresholds are interpreted as normalized 0-1 terrain elevation range values. |
| recessionFromWater | Number | 0 | (Experimental) Distance over which forest fades in away from water. Adds a no/low-forest buffer outside the water. If usePhysicalUnits is true, this is interpreted as world distance. Otherwise it is interpreted as 0-1 of map width. E.g. `0.05` mean 5% of map width when usePhysicalUnits == false, and `30` mean 30 meters/world-units when usePhysicalUnits == true. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Create Local Relief Mask
FunctionCreates a terrain flatness mask from local relief.
CreateLocalReliefMask -> Scalar Field
terrain: Scalar Field
radius: Integer
maxLocalRelief: Number
falloff: NumberScalarField2D CreateLocalReliefMask(
ScalarField2D terrain,
int radius,
double maxLocalRelief,
double falloff)Parameters
| name | type | default | description |
|---|---|---|---|
| terrain | Scalar Field | — | Source terrain. |
| radius | Integer | — | Neighborhood radius in cells used to measure local min/max relief. |
| maxLocalRelief | Number | — | Maximum local height range considered fully suitable. |
| falloff | Number | — | Relief range above maxLocalRelief over which the mask fades to 0. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Create Radial Mask
FunctionThis node carries no documentation.
CreateRadialMask -> Scalar Field
width: Integer
height: Integer
centerX: Number
centerY: Number
radius: Number
falloff: Number
falloffType: HeightmapFalloffTypeScalarField2D CreateRadialMask(
int width,
int height,
double centerX = 0.5,
double centerY = 0.5,
double radius = 0.85,
double falloff = 0.15,
HeightmapFalloffType falloffType = HeightmapFalloffType.SmootherStep)Parameters
| name | type | default | description |
|---|---|---|---|
| width | Integer | — | |
| height | Integer | — | |
| centerX | Number | 0.5 | |
| centerY | Number | 0.5 | |
| radius | Number | 0.85 | |
| falloff | Number | 0.15 | |
| falloffType | HeightmapFalloffType | Smoother step |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Create Snow Mask
FunctionOverload 1 of 2
CreateSnowMask -> Scalar Field
terrain: Scalar Field
snowLine: Number
snowAmount: Number
snowLineFalloff: Number
maxSlopeDegrees: Number
slopeFalloffDegrees: Number
settleRadius: Integer
settleIterations: Integer
smoothing: Number
usePhysicalUnits: TruthScalarField2D CreateSnowMask(
ScalarField2D terrain,
double snowLine,
double snowAmount = 0.08,
double snowLineFalloff = 0.12,
double maxSlopeDegrees = 38,
double slopeFalloffDegrees = 18,
int settleRadius = 3,
int settleIterations = 3,
double smoothing = 0.65,
bool usePhysicalUnits = true)Creates a snow coverage mask from elevation, slope retention, and settling.
Parameters
| name | type | default | description |
|---|---|---|---|
| terrain | Scalar Field | — | Source terrain. |
| snowLine | Number | — | Elevation where snow begins to accumulate. |
| snowAmount | Number | 0.08 | Maximum snow depth added before settling. |
| snowLineFalloff | Number | 0.12 | Elevation range used to feather snow around the snow line. |
| maxSlopeDegrees | Number | 38 | Slope angle where snow remains fully retained. |
| slopeFalloffDegrees | Number | 18 | Slope fade range above maxSlopeDegrees. |
| settleRadius | Integer | 3 | Smoothing radius used while settling snow surface. |
| settleIterations | Integer | 3 | Number of settling passes. |
| smoothing | Number | 0.65 | Settling smooth strength. |
| usePhysicalUnits | Truth | True | If true, slope calculation uses terrain PhysicalScale. |
Returns
| result | Scalar Field |
Overload 2 of 2
CreateSnowMask -> (result: Scalar Field, snowDepth: Scalar Field, snowSurfaceElevation: Scalar Field)
terrain: Scalar Field
snowLine: Number
snowAmount: Number
snowLineFalloff: Number
maxSlopeDegrees: Number
slopeFalloffDegrees: Number
settleRadius: Integer
settleIterations: Integer
smoothing: Number
usePhysicalUnits: TruthScalarField2D CreateSnowMask(
ScalarField2D terrain,
out ScalarField2D snowDepth,
out ScalarField2D snowSurfaceElevation,
double snowLine,
double snowAmount = 0.08,
double snowLineFalloff = 0.12,
double maxSlopeDegrees = 38,
double slopeFalloffDegrees = 18,
int settleRadius = 3,
int settleIterations = 3,
double smoothing = 0.65,
bool usePhysicalUnits = true)Creates a snow coverage mask and exposes snow depth and final snow surface elevation.
Parameters
| name | type | default | description |
|---|---|---|---|
| terrain | Scalar Field | — | Source terrain. |
| snowLine | Number | — | Elevation where snow begins to accumulate. |
| snowAmount | Number | 0.08 | Maximum snow depth added before settling. |
| snowLineFalloff | Number | 0.12 | Elevation range used to feather snow around the snow line. |
| maxSlopeDegrees | Number | 38 | Slope angle where snow remains fully retained. |
| slopeFalloffDegrees | Number | 18 | Slope fade range above maxSlopeDegrees. |
| settleRadius | Integer | 3 | Smoothing radius used while settling snow surface. |
| settleIterations | Integer | 3 | Number of settling passes. |
| smoothing | Number | 0.65 | Settling smooth strength. |
| usePhysicalUnits | Truth | True | If true, slope calculation uses terrain PhysicalScale. |
Returns
| result | Scalar Field |
| snowDepth | Scalar Field |
| snowSurfaceElevation | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Create Water Mask
FunctionOverload 1 of 2
CreateWaterMask -> Scalar Field
terrain: Scalar Field
precipitation: Scalar Field
channelHeadArea: Number
channelFullArea: Number
rainfallScale: Number
dischargeScalar: Number
routingMode: ScalarField2DHydrology.FlowRoutingMode
mfdExponent: Number
outletMask: Scalar Field
useBordersAsOutlets: Truth
minimumDrainageSlope: Number
outletThreshold: Number
minimumLakeDepth: Number
lakeFeatherDepth: Number
includeRivers: Truth
includeLakes: Truth
usePhysicalUnits: TruthScalarField2D CreateWaterMask(
ScalarField2D terrain,
ScalarField2D precipitation,
double channelHeadArea = 1024,
double channelFullArea = 0,
double rainfallScale = 1,
double dischargeScalar = 1,
ScalarField2DHydrology.FlowRoutingMode routingMode = FlowRoutingMode.MultipleFlowDirection,
double mfdExponent = 1.1,
ScalarField2D outletMask,
bool useBordersAsOutlets = true,
double minimumDrainageSlope = 1E-05,
double outletThreshold = 0.5,
double minimumLakeDepth = 0.001,
double lakeFeatherDepth = 0.01,
bool includeRivers = true,
bool includeLakes = true,
bool usePhysicalUnits = true)Creates a combined water mask from routed rivers and filled-depression lakes.
Parameters
| name | type | default | description |
|---|---|---|---|
| terrain | Scalar Field | — | Source terrain. |
| precipitation | Scalar Field | — | Optional rainfall/intensity map. Null means uniform rainfall. |
| channelHeadArea | Number | 1024 | Accumulated contributing area where river selection begins. |
| channelFullArea | Number | 0 | Accumulated contributing area where river mask reaches 1. If less than or equal to zero, channelHeadArea * 8 is used. |
| rainfallScale | Number | 1 | Global multiplier for rainfall contribution. |
| dischargeScalar | Number | 1 | Multiplier applied to flow accumulation before river selection. |
| routingMode | ScalarField2DHydrology.FlowRoutingMode | Multiple flow direction | Flow routing model. |
| mfdExponent | Number | 1.1 | Multiple-flow-direction concentration exponent. |
| outletMask | Scalar Field | — | Optional outlet mask. Values at or above outletThreshold are drainage outlets. |
| useBordersAsOutlets | Truth | True | If true, terrain borders are drainage outlets. |
| minimumDrainageSlope | Number | 1E-05 | Minimum downhill gradient used when creating the drainable routing surface. |
| outletThreshold | Number | 0.5 | Outlet mask threshold. |
| minimumLakeDepth | Number | 0.001 | Minimum depression fill depth required before a lake appears. |
| lakeFeatherDepth | Number | 0.01 | Depth range over which lake mask ramps from 0 to 1. |
| includeRivers | Truth | True | If true, include river contribution. |
| includeLakes | Truth | True | If true, include lake contribution. |
| usePhysicalUnits | Truth | True | If true, area and slope values use terrain PhysicalScale. |
Returns
| result | Scalar Field |
Overload 2 of 2
CreateWaterMask -> (result: Scalar Field, riverMask: Scalar Field, lakeMask: Scalar Field, waterDepth: Scalar Field, waterSurfaceElevation: Scalar Field, flowAccumulation: Scalar Field)
terrain: Scalar Field
precipitation: Scalar Field
channelHeadArea: Number
channelFullArea: Number
rainfallScale: Number
dischargeScalar: Number
routingMode: ScalarField2DHydrology.FlowRoutingMode
mfdExponent: Number
outletMask: Scalar Field
useBordersAsOutlets: Truth
minimumDrainageSlope: Number
outletThreshold: Number
minimumLakeDepth: Number
lakeFeatherDepth: Number
includeRivers: Truth
includeLakes: Truth
usePhysicalUnits: TruthScalarField2D CreateWaterMask(
ScalarField2D terrain,
out ScalarField2D riverMask,
out ScalarField2D lakeMask,
out ScalarField2D waterDepth,
out ScalarField2D waterSurfaceElevation,
out ScalarField2D flowAccumulation,
ScalarField2D precipitation,
double channelHeadArea = 1024,
double channelFullArea = 0,
double rainfallScale = 1,
double dischargeScalar = 1,
ScalarField2DHydrology.FlowRoutingMode routingMode = FlowRoutingMode.MultipleFlowDirection,
double mfdExponent = 1.1,
ScalarField2D outletMask,
bool useBordersAsOutlets = true,
double minimumDrainageSlope = 1E-05,
double outletThreshold = 0.5,
double minimumLakeDepth = 0.001,
double lakeFeatherDepth = 0.01,
bool includeRivers = true,
bool includeLakes = true,
bool usePhysicalUnits = true)Creates a combined water mask and exposes the derived river, lake, depth, surface, and flow maps.
Parameters
| name | type | default | description |
|---|---|---|---|
| terrain | Scalar Field | — | Source terrain. |
| precipitation | Scalar Field | — | Optional rainfall/intensity map. Null means uniform rainfall. |
| channelHeadArea | Number | 1024 | Accumulated contributing area where river selection begins. |
| channelFullArea | Number | 0 | Accumulated contributing area where river mask reaches 1. If less than or equal to zero, channelHeadArea * 8 is used. |
| rainfallScale | Number | 1 | Global multiplier for rainfall contribution. |
| dischargeScalar | Number | 1 | Multiplier applied to flow accumulation before river selection. |
| routingMode | ScalarField2DHydrology.FlowRoutingMode | Multiple flow direction | Flow routing model. |
| mfdExponent | Number | 1.1 | Multiple-flow-direction concentration exponent. |
| outletMask | Scalar Field | — | Optional outlet mask. Values at or above outletThreshold are drainage outlets. |
| useBordersAsOutlets | Truth | True | If true, terrain borders are drainage outlets. |
| minimumDrainageSlope | Number | 1E-05 | Minimum downhill gradient used when creating the drainable routing surface. |
| outletThreshold | Number | 0.5 | Outlet mask threshold. |
| minimumLakeDepth | Number | 0.001 | Minimum depression fill depth required before a lake appears. |
| lakeFeatherDepth | Number | 0.01 | Depth range over which lake mask ramps from 0 to 1. |
| includeRivers | Truth | True | If true, include river contribution. |
| includeLakes | Truth | True | If true, include lake contribution. |
| usePhysicalUnits | Truth | True | If true, area and slope values use terrain PhysicalScale. |
Returns
| result | Scalar Field |
| riverMask | Scalar Field |
| lakeMask | Scalar Field |
| waterDepth | Scalar Field |
| waterSurfaceElevation | Scalar Field |
| flowAccumulation | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Create Water Plane
FunctionSimply mask out a water plane based on specified Water Level.
If Is Normalized, then Water Level is between 0-1.
CreateWaterPlane -> Scalar Field
terrain: Scalar Field
waterLevel: Number
isNormalized: TruthScalarField2D CreateWaterPlane(
ScalarField2D terrain,
double waterLevel,
bool isNormalized)Parameters
| name | type | default | description |
|---|---|---|---|
| terrain | Scalar Field | — | |
| waterLevel | Number | — | |
| isNormalized | Truth | — |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Crop
FunctionCrops the source scalar field to the specified rectangular region.
Crop -> Scalar Field
source: Scalar Field
startX: Integer
startY: Integer
cropWidth: Integer
cropHeight: IntegerScalarField2D Crop(
ScalarField2D source,
int startX,
int startY,
int cropWidth,
int cropHeight)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | Source scalar field. |
| startX | Integer | — | Starting x-coordinate / column index. |
| startY | Integer | — | Starting y-coordinate / row index. |
| cropWidth | Integer | — | Cropped width / column count. |
| cropHeight | Integer | — | Cropped height / row count. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Curve Adjustment
FunctionApplies a normalized level adjustment transfer curve while preserving the current elevation range.
CurveAdjustment -> Scalar Field
source: Scalar Field
curve: Level Adjustment Curve
strength: NumberScalarField2D CurveAdjustment(
ScalarField2D source,
LevelAdjustmentCurve curve,
double strength = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | Source heightmap or mask. |
| curve | Level Adjustment Curve | — | Normalized 0..1 transfer curve. |
| strength | Number | 1 | 0 = unchanged, 1 = full curve adjustment. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Curve Adjustment In Place
FunctionApplies a normalized level adjustment transfer curve while preserving the current elevation range.
CurveAdjustmentInPlace
heightmap: Scalar Field
curve: Level Adjustment Curve
strength: Numbervoid CurveAdjustmentInPlace(
ScalarField2D heightmap,
LevelAdjustmentCurve curve,
double strength = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| heightmap | Scalar Field | — | Target heightmap or mask. |
| curve | Level Adjustment Curve | — | Normalized 0..1 transfer curve. |
| strength | Number | 1 | 0 = unchanged, 1 = full curve adjustment. |
Remarks
Current values are normalized into 0..1 using the current min/max, passed through the curve,
then converted back into the original elevation range.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Divide
FunctionThis node carries no documentation.
Overload 1 of 3
Divide(source: Scalar Field, value: Number) -> Scalar Field
ScalarField2D Divide(ScalarField2D source, double value)
Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| value | Number | — |
Returns
| result | Scalar Field |
Overload 2 of 3
Divide(value: Number, source: Scalar Field) -> Scalar Field
ScalarField2D Divide(double value, ScalarField2D source)
Parameters
| name | type | default | description |
|---|---|---|---|
| value | Number | — | |
| source | Scalar Field | — |
Returns
| result | Scalar Field |
Overload 3 of 3
Divide(a: Scalar Field, b: Scalar Field) -> Scalar Field
ScalarField2D Divide(ScalarField2D a, ScalarField2D b)
Parameters
| name | type | default | description |
|---|---|---|---|
| a | Scalar Field | — | |
| b | Scalar Field | — |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Divide In Place
FunctionThis node carries no documentation.
Overload 1 of 2
DivideInPlace(target: Scalar Field, value: Number)
void DivideInPlace(ScalarField2D target, double value)
Parameters
| name | type | default | description |
|---|---|---|---|
| target | Scalar Field | — | |
| value | Number | — |
Overload 2 of 2
DivideInPlace(target: Scalar Field, value: Scalar Field)
void DivideInPlace(ScalarField2D target, ScalarField2D value)
Parameters
| name | type | default | description |
|---|---|---|---|
| target | Scalar Field | — | |
| value | Scalar Field | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Equalize
FunctionRedistributes values by percentile rank while preserving the current elevation range.
Equalize -> Scalar Field
source: Scalar Field
equalization: NumberScalarField2D Equalize(
ScalarField2D source,
double equalization = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | Source heightmap or mask. |
| equalization | Number | 1 | 0 = unchanged, 1 = fully equalized. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Equalize In Place
FunctionRedistributes values by percentile rank while preserving the current elevation range.
EqualizeInPlace(heightmap: Scalar Field, equalization: Number)
void EqualizeInPlace(
ScalarField2D heightmap,
double equalization = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| heightmap | Scalar Field | — | Target heightmap or mask. |
| equalization | Number | 1 | 0 = unchanged, 1 = fully equalized. |
Remarks
Unlike Normalize, this changes the value distribution. Values are remapped by sorted rank/CDF, so common ranges are compressed and rare ranges are expanded.
Duplicate values are kept identical by assigning the whole equal-value group the same rank.
For realistic terrain, use Equalize(..., 0.15d..0.35d) on actual heightmaps, but 0.7d..1d on masks.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Fill In Place
FunctionThis node carries no documentation.
FillInPlace(heightmap: Scalar Field, value: Number)
void FillInPlace(ScalarField2D heightmap, double value)
Parameters
| name | type | default | description |
|---|---|---|---|
| heightmap | Scalar Field | — | |
| value | Number | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Filter By Height
FunctionOverload 1 of 2
FilterByHeight -> Scalar Field
heightMap: Scalar Field
rule: Height Filter Rule
value: Number
fade: NumberScalarField2D FilterByHeight(
ScalarField2D heightMap,
ScalarField2D.HeightFilterRule rule,
double value,
double fade = 0)Filters the heightmap based on a minimum or maximum height rule with an optional fade.
Parameters
| name | type | default | description |
|---|---|---|---|
| heightMap | Scalar Field | — | |
| rule | Height Filter Rule | — | Min or Max. |
| value | Number | — | The height value. |
| fade | Number | 0 | Optional fade distance. |
Returns
| result | Scalar Field |
Overload 2 of 2
FilterByHeight -> Scalar Field
heightMap: Scalar Field
minHeight: Number
maxHeight: Number
fade: NumberScalarField2D FilterByHeight(
ScalarField2D heightMap,
double minHeight,
double maxHeight,
double fade = 0)Filters the heightmap based on a height range with an optional fade.
Parameters
| name | type | default | description |
|---|---|---|---|
| heightMap | Scalar Field | — | |
| minHeight | Number | — | Minimum height value. |
| maxHeight | Number | — | Maximum height value. |
| fade | Number | 0 | Optional fade distance. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Filter By Slope
FunctionOverload 1 of 2
FilterBySlope -> Scalar Field
heightMap: Scalar Field
minSlope: Number
maxSlope: Number
fade: NumberScalarField2D FilterBySlope(
ScalarField2D heightMap,
double minSlope,
double maxSlope,
double fade = 0)Filters the heightmap based on slope range with an optional fade.
Filters by real-world terrain slope angle.
0° = flat
90° = vertical
Parameters
| name | type | default | description |
|---|---|---|---|
| heightMap | Scalar Field | — | Source terrain. |
| minSlope | Number | — | Minimum slope in degrees. |
| maxSlope | Number | — | Maximum slope in degrees. |
| fade | Number | 0 | Optional fade distance (in degrees). |
Returns
| result | Scalar Field |
Remarks
Filter slope angle in degrees.
Per HeightmapOperations.CalculateSlopeAngleDegrees
Overload 2 of 2
FilterBySlope -> Scalar Field
source: Scalar Field
slopeType: Slope Map Type
minSlope: Number
maxSlope: Number
falloff: NumberScalarField2D FilterBySlope(
ScalarField2D source,
ScalarField2D.SlopeMapType slopeType,
double minSlope = 0,
double maxSlope = 1,
double falloff = 0)This node carries no documentation.
Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| slopeType | Slope Map Type | — | |
| minSlope | Number | 0 | |
| maxSlope | Number | 1 | |
| falloff | Number | 0 |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Filter By Value
FunctionThis node carries no documentation.
FilterByValue -> Scalar Field
source: Scalar Field
minValue: Number
maxValue: Number
falloff: NumberScalarField2D FilterByValue(
ScalarField2D source,
double minValue,
double maxValue,
double falloff = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| minValue | Number | — | |
| maxValue | Number | — | |
| falloff | Number | 0 | The `falloff` parameter softens the mask edges outside the [minValue, maxValue] range |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Subtract by 1
FunctionInvert by subtracting from 1.
Invert(source: Scalar Field) -> Scalar Field
ScalarField2D Invert(ScalarField2D source)
Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — |
Returns
| result | Scalar Field |
Remarks
Typically this is only used when range if normalized between 0-1, but may be occassionally useful otherwise.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Invert Range
FunctionThis node carries no documentation.
InvertRange(source: Scalar Field) -> Scalar Field
ScalarField2D InvertRange(ScalarField2D source)
Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Make Drainage
FunctionModifies terrain in place so non-outlet cells can drain toward an outlet.
MakeDrainage -> Scalar Field
source: Scalar Field
outletMask: Scalar Field
useBordersAsOutlets: Truth
minimumDrainageSlope: Number
strength: Number
outletThreshold: Number
usePhysicalScale: TruthScalarField2D MakeDrainage(
ScalarField2D source,
ScalarField2D outletMask,
bool useBordersAsOutlets = true,
double minimumDrainageSlope = 1E-05,
double strength = 1,
double outletThreshold = 0.5,
bool usePhysicalScale = true)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | Source terrain to generate from. |
| outletMask | Scalar Field | — | Optional outlet mask. Values at or above outletThreshold are drainage targets. |
| useBordersAsOutlets | Truth | True | If true, terrain borders are drainage targets. |
| minimumDrainageSlope | Number | 1E-05 | Minimum downhill gradient in height units per horizontal unit. |
| strength | Number | 1 | Blend from original terrain to corrected drainage terrain. 1 applies the full correction. |
| outletThreshold | Number | 0.5 | Outlet mask threshold. |
| usePhysicalScale | Truth | True | If true, minimumDrainageSlope is interpreted per PhysicalScale world unit. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Make Drainage In Place
FunctionModifies terrain in place so non-outlet cells can drain toward an outlet.
MakeDrainageInPlace
target: Scalar Field
outletMask: Scalar Field
useBordersAsOutlets: Truth
minimumDrainageSlope: Number
strength: Number
outletThreshold: Number
usePhysicalScale: Truthvoid MakeDrainageInPlace(
ScalarField2D target,
ScalarField2D outletMask,
bool useBordersAsOutlets = true,
double minimumDrainageSlope = 1E-05,
double strength = 1,
double outletThreshold = 0.5,
bool usePhysicalScale = true)Parameters
| name | type | default | description |
|---|---|---|---|
| target | Scalar Field | — | Target terrain to modify. |
| outletMask | Scalar Field | — | Optional outlet mask. Values at or above outletThreshold are drainage targets. |
| useBordersAsOutlets | Truth | True | If true, terrain borders are drainage targets. |
| minimumDrainageSlope | Number | 1E-05 | Minimum downhill gradient in height units per horizontal unit. |
| strength | Number | 1 | Blend from original terrain to corrected drainage terrain. 1 applies the full correction. |
| outletThreshold | Number | 0.5 | Outlet mask threshold. |
| usePhysicalScale | Truth | True | If true, minimumDrainageSlope is interpreted per PhysicalScale world unit. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Make Terrace
FunctionCreates a terraced copy while preserving the source elevation range.
MakeTerrace -> Scalar Field
source: Scalar Field
terraceCount: Integer
strength: Number
method: HeightmapOperations.TerraceMethod
terraceShape: Number
layerMode: HeightmapOperations.TerraceLayerMode
layerBias: Number
mask: Scalar Field
terraceModulation: Scalar Field
modulationStrength: NumberScalarField2D MakeTerrace(
ScalarField2D source,
int terraceCount = 8,
double strength = 1,
HeightmapOperations.TerraceMethod method = TerraceMethod.Sharp,
double terraceShape = 0.75,
HeightmapOperations.TerraceLayerMode layerMode = TerraceLayerMode.Uniform,
double layerBias = 0,
ScalarField2D mask,
ScalarField2D terraceModulation,
double modulationStrength = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| terraceCount | Integer | 8 | |
| strength | Number | 1 | |
| method | HeightmapOperations.TerraceMethod | Sharp | |
| terraceShape | Number | 0.75 | |
| layerMode | HeightmapOperations.TerraceLayerMode | Uniform | |
| layerBias | Number | 0 | |
| mask | Scalar Field | — | |
| terraceModulation | Scalar Field | — | |
| modulationStrength | Number | 0 |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Make Terrace In Place
FunctionApplies terrace shaping in place while preserving the current elevation range.
MakeTerraceInPlace
target: Scalar Field
terraceCount: Integer
strength: Number
method: HeightmapOperations.TerraceMethod
terraceShape: Number
layerMode: HeightmapOperations.TerraceLayerMode
layerBias: Number
mask: Scalar Field
terraceModulation: Scalar Field
modulationStrength: Numbervoid MakeTerraceInPlace(
ScalarField2D target,
int terraceCount = 8,
double strength = 1,
HeightmapOperations.TerraceMethod method = TerraceMethod.Sharp,
double terraceShape = 0.75,
HeightmapOperations.TerraceLayerMode layerMode = TerraceLayerMode.Uniform,
double layerBias = 0,
ScalarField2D mask,
ScalarField2D terraceModulation,
double modulationStrength = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| target | Scalar Field | — | Target heightmap. |
| terraceCount | Integer | 8 | Number of terrace levels. |
| strength | Number | 1 | 0 = unchanged, 1 = fully terraced. |
| method | HeightmapOperations.TerraceMethod | Sharp | Sharp concentrates the riser near the top of each terrace band; Smooth centers and softens the riser. |
| terraceShape | Number | 0.75 | 0 = soft/continuous, 1 = broad flats with narrow risers. |
| layerMode | HeightmapOperations.TerraceLayerMode | Uniform | Controls non-uniform vertical terrace spacing. |
| layerBias | Number | 0 | 0 = uniform spacing, 1 = strongest layer distribution bias. |
| mask | Scalar Field | — | Optional 0-1 mask controlling local effect strength. |
| terraceModulation | Scalar Field | — | Optional 0-1 modulation map shifting terrace bands locally. |
| modulationStrength | Number | 0 | Terrace-band phase shift strength. 1 shifts up to half a terrace band. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Multiply
FunctionThis node carries no documentation.
Overload 1 of 2
Multiply(source: Scalar Field, value: Number) -> Scalar Field
ScalarField2D Multiply(ScalarField2D source, double value)
Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| value | Number | — |
Returns
| result | Scalar Field |
Overload 2 of 2
Multiply(a: Scalar Field, b: Scalar Field) -> Scalar Field
ScalarField2D Multiply(ScalarField2D a, ScalarField2D b)
Parameters
| name | type | default | description |
|---|---|---|---|
| a | Scalar Field | — | |
| b | Scalar Field | — |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Multiply In Place
FunctionThis node carries no documentation.
Overload 1 of 2
MultiplyInPlace(target: Scalar Field, mask: Scalar Field)
void MultiplyInPlace(ScalarField2D target, ScalarField2D mask)
Parameters
| name | type | default | description |
|---|---|---|---|
| target | Scalar Field | — | |
| mask | Scalar Field | — |
Overload 2 of 2
MultiplyInPlace(target: Scalar Field, value: Number)
void MultiplyInPlace(ScalarField2D target, double value)
Parameters
| name | type | default | description |
|---|---|---|---|
| target | Scalar Field | — | |
| value | Number | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Negate
FunctionNegates all values.
Negate(source: Scalar Field) -> Scalar Field
ScalarField2D Negate(ScalarField2D source)
Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — |
Returns
| result | Scalar Field |
Remarks
Use with care, depending on context the result may not make sense.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Normalize
FunctionThis node carries no documentation.
Normalize -> Scalar Field
source: Scalar Field
newMin: Number
newMax: NumberScalarField2D Normalize(
ScalarField2D source,
double newMin = 0,
double newMax = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| newMin | Number | 0 | |
| newMax | Number | 1 |
Returns
| result | Scalar Field |
Remarks
Can also be used to "rescale" height range.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Normalize In Place
FunctionRescale entire height field to fit in height range.
NormalizeInPlace
heightmap: Scalar Field
newMin: Number
newMax: Numbervoid NormalizeInPlace(
ScalarField2D heightmap,
double newMin = 0,
double newMax = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| heightmap | Scalar Field | — | |
| newMin | Number | 0 | |
| newMax | Number | 1 |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Power
FunctionThis node carries no documentation.
Power(source: Scalar Field, exponent: Number) -> Scalar Field
ScalarField2D Power(ScalarField2D source, double exponent)
Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| exponent | Number | — |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Replace In Place
FunctionReplace data from flattened array.
Overload 1 of 2
ReplaceInPlace
heightmap: Scalar Field
ldData: Low Accuracy Number Arrayvoid ReplaceInPlace(ScalarField2D heightmap, float[] ldData)
Parameters
| name | type | default | description |
|---|---|---|---|
| heightmap | Scalar Field | — | |
| ldData | Low Accuracy Number Array | — |
Overload 2 of 2
ReplaceInPlace(heightmap: Scalar Field, hdData: Number Array)
void ReplaceInPlace(ScalarField2D heightmap, double[] hdData)
Parameters
| name | type | default | description |
|---|---|---|---|
| heightmap | Scalar Field | — | |
| hdData | Number Array | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Resize
FunctionResizes the source scalar field to the specified dimensions.
Resize -> Scalar Field
source: Scalar Field
newWidth: Integer
newHeight: Integer
interpolation: ScalarField2D.HeightmapResizeInterpolation
preserveElevationRange: Truth
physicalScale: NumberScalarField2D Resize(
ScalarField2D source,
int newWidth,
int newHeight,
ScalarField2D.HeightmapResizeInterpolation interpolation = HeightmapResizeInterpolation.Bilinear,
bool preserveElevationRange = false,
double physicalScale = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | Source scalar field. |
| newWidth | Integer | — | New width / column count. |
| newHeight | Integer | — | New height / row count. |
| interpolation | ScalarField2D.HeightmapResizeInterpolation | Bilinear | Interpolation method. |
| preserveElevationRange | Truth | False | Rescales result so original min/max elevation remains unchanged. |
| physicalScale | Number | 1 | Sets the new physical scale. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Smooth
FunctionUseful on low-resolution imports.
Smooth -> Scalar Field
source: Scalar Field
radius: Integer
strength: NumberScalarField2D Smooth(
ScalarField2D source,
int radius = 1,
double strength = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| radius | Integer | 1 | |
| strength | Number | 1 |
Returns
| result | Scalar Field |
Remarks
Another technique is to add new fbm noise on top of imported.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Subdivide
FunctionCreates a more densely subdivided scalar field while preserving its overall physical dimensions.
Subdivide -> Scalar Field
source: Scalar Field
factor: Integer
interpolation: ScalarField2D.HeightmapResizeInterpolation
preserveElevationRange: TruthScalarField2D Subdivide(
ScalarField2D source,
int factor = 2,
ScalarField2D.HeightmapResizeInterpolation interpolation = HeightmapResizeInterpolation.Bilinear,
bool preserveElevationRange = false)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | Source scalar field. |
| factor | Integer | 2 | Number of cells created along each axis for every existing cell. |
| interpolation | ScalarField2D.HeightmapResizeInterpolation | Bilinear | Interpolation method. |
| preserveElevationRange | Truth | False | Rescales the result so the original minimum and maximum elevations remain unchanged. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Subdivide In Place
FunctionSubdivides the target scalar field in place while preserving its overall physical dimensions.
SubdivideInPlace
target: Scalar Field
factor: Integer
interpolation: ScalarField2D.HeightmapResizeInterpolation
preserveElevationRange: Truthvoid SubdivideInPlace(
ScalarField2D target,
int factor = 2,
ScalarField2D.HeightmapResizeInterpolation interpolation = HeightmapResizeInterpolation.Bilinear,
bool preserveElevationRange = false)Parameters
| name | type | default | description |
|---|---|---|---|
| target | Scalar Field | — | |
| factor | Integer | 2 | |
| interpolation | ScalarField2D.HeightmapResizeInterpolation | Bilinear | |
| preserveElevationRange | Truth | False |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Subtract
FunctionThis node carries no documentation.
Overload 1 of 3
Subtract(source: Scalar Field, value: Number) -> Scalar Field
ScalarField2D Subtract(ScalarField2D source, double value)
Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| value | Number | — |
Returns
| result | Scalar Field |
Overload 2 of 3
Subtract(value: Number, source: Scalar Field) -> Scalar Field
ScalarField2D Subtract(double value, ScalarField2D source)
Parameters
| name | type | default | description |
|---|---|---|---|
| value | Number | — | |
| source | Scalar Field | — |
Returns
| result | Scalar Field |
Overload 3 of 3
Subtract(a: Scalar Field, b: Scalar Field) -> Scalar Field
ScalarField2D Subtract(ScalarField2D a, ScalarField2D b)
Parameters
| name | type | default | description |
|---|---|---|---|
| a | Scalar Field | — | |
| b | Scalar Field | — |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Subtract In Place
FunctionThis node carries no documentation.
Overload 1 of 2
SubtractInPlace(target: Scalar Field, value: Number)
void SubtractInPlace(ScalarField2D target, double value)
Parameters
| name | type | default | description |
|---|---|---|---|
| target | Scalar Field | — | |
| value | Number | — |
Overload 2 of 2
SubtractInPlace(target: Scalar Field, value: Scalar Field)
void SubtractInPlace(ScalarField2D target, ScalarField2D value)
Parameters
| name | type | default | description |
|---|---|---|---|
| target | Scalar Field | — | |
| value | Scalar Field | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Terrace
FunctionThis node carries no documentation.
Terrace -> Scalar Field
source: Scalar Field
terraceCount: Integer
strength: NumberScalarField2D Terrace(
ScalarField2D source,
int terraceCount,
double strength = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| terraceCount | Integer | — | |
| strength | Number | 1 |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation
Threshold
FunctionCreates a binary mask by converting values below the threshold to 0 and values at or above the threshold to 1.
Threshold -> Scalar Field
waterField: Scalar Field
threshold: NumberScalarField2D Threshold(
ScalarField2D waterField,
double threshold)Parameters
| name | type | default | description |
|---|---|---|---|
| waterField | Scalar Field | — | The source scalar field containing mask values. |
| threshold | Number | — | The inclusive threshold used to classify values as 1. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Operations
- Package
- Procedural Generation