Divooka Reference

Heightmap Operations

63 nodes

On this page 63

Add

Function

This node carries no documentation.

Overload 1 of 2

Signature
Add(source: Scalar Field, value: Number) -> Scalar Field
ScalarField2D Add(ScalarField2D source, double value)

Parameters

nametypedefaultdescription
sourceScalar Field—
valueNumber—

Returns

resultScalar Field

Overload 2 of 2

Signature
Add(a: Scalar Field, b: Scalar Field) -> Scalar Field
ScalarField2D Add(ScalarField2D a, ScalarField2D b)

Parameters

nametypedefaultdescription
aScalar Field—
bScalar Field—

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Add In Place

Function

This node carries no documentation.

Overload 1 of 2

Signature
AddInPlace(target: Scalar Field, value: Number)
void AddInPlace(ScalarField2D target, double value)

Parameters

nametypedefaultdescription
targetScalar Field—
valueNumber—

Overload 2 of 2

Signature
AddInPlace(target: Scalar Field, value: Scalar Field)
void AddInPlace(ScalarField2D target, ScalarField2D value)

Parameters

nametypedefaultdescription
targetScalar Field—
valueScalar Field—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Apply Curve

Function

This node carries no documentation.

Signature
ApplyCurve -> Scalar Field
    source: Scalar Field
    curve: Func<Number, Number>
ScalarField2D ApplyCurve(
    ScalarField2D source,
    Func<double, double> curve)

Parameters

nametypedefaultdescription
sourceScalar Field—
curveFunc<Number, Number>—

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Apply Masks

Function

Applies a series of HeightmapMasks to the Heightmap using a specified modification function.

Signature
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

nametypedefaultdescription
sourceScalar Field—
masksScalar Field Array—Array of HeightmapMasks to apply.
modificationFunc<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

Function

This node carries no documentation.

Signature
Blend -> Scalar Field
    a: Scalar Field
    b: Scalar Field
    mode: Scalar Field Blend Operation
    weight: Number
ScalarField2D Blend(
    ScalarField2D a,
    ScalarField2D b,
    ScalarField2DBlendOperation mode,
    double weight = 1)

Parameters

nametypedefaultdescription
aScalar Field—
bScalar Field—
modeScalar Field Blend Operation—
weightNumber1

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Blend Height Mask

Function

Creates a modified copy of a heightmap by applying a grayscale height mask using the specified blend mode.

Signature
BlendHeightMask -> Scalar Field
    source: Scalar Field
    heightsMask: Pixel Image
    startHeight: Number
    maxHeight: Number
    mode: TerrainBlendMaskApplicationMode
ScalarField2D BlendHeightMask(
    ScalarField2D source,
    PixelImage heightsMask,
    double startHeight,
    double maxHeight,
    TerrainBlendMaskApplicationMode mode)

Parameters

nametypedefaultdescription
sourceScalar Field—The source heightmap to blend.
heightsMaskPixel 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.
startHeightNumber—The target height represented by a mask value of 0.
maxHeightNumber—The target height represented by a mask value of 255.
modeTerrainBlendMaskApplicationMode—The mode used to apply the computed target height to each source height.

Returns

resultScalar 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

Function

This node carries no documentation.

Signature
BlendMasked -> Scalar Field
    a: Scalar Field
    b: Scalar Field
    mask: Scalar Field
ScalarField2D BlendMasked(
    ScalarField2D a,
    ScalarField2D b,
    ScalarField2D mask)

Parameters

nametypedefaultdescription
aScalar Field—
bScalar Field—
maskScalar Field—

Returns

resultScalar 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

Function

Calculates routed rainfall accumulation across the terrain.

Signature
CalculateFlowAccumulationMap -> Scalar Field
    terrain: Scalar Field
    precipitation: Scalar Field
    rainfallScale: Number
    routingMode: ScalarField2DHydrology.FlowRoutingMode
    mfdExponent: Number
    usePhysicalScale: Truth
ScalarField2D CalculateFlowAccumulationMap(
    ScalarField2D terrain,
    ScalarField2D precipitation,
    double rainfallScale = 1,
    ScalarField2DHydrology.FlowRoutingMode routingMode = FlowRoutingMode.MultipleFlowDirection,
    double mfdExponent = 1.1,
    bool usePhysicalScale = true)

Parameters

nametypedefaultdescription
terrainScalar Field—Source terrain.
precipitationScalar Field—Optional rainfall/intensity map. Null means uniform rainfall.
rainfallScaleNumber1Global multiplier for rainfall contribution.
routingModeScalarField2DHydrology.FlowRoutingModeMultiple flow directionFlow routing model.
mfdExponentNumber1.1Multiple-flow-direction concentration exponent.
usePhysicalScaleTruthTrueIf true, accumulation uses PhysicalScale as world area. If false, accumulation uses cell count.

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Calculate Height Change

Function

This node carries no documentation.

Signature
CalculateHeightChange(source: Scalar Field) -> Scalar Field
ScalarField2D CalculateHeightChange(ScalarField2D source)

Parameters

nametypedefaultdescription
sourceScalar Field—

Returns

resultScalar 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

Function

Calculates pixel-space gradient magnitude and normalizes the result to 0-1.
Does not use PhysicalScale.

Signature
CalculateHeightChangeNormalized(source: Scalar Field) -> Scalar Field
ScalarField2D CalculateHeightChangeNormalized(ScalarField2D source)

Parameters

nametypedefaultdescription
sourceScalar Field—

Returns

resultScalar 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

Function

Calculates normal-derived steepness.
Range: 0 to 1.
0 = flat, 1 = vertical.
Uses PhysicalScale by default.

Signature
CalculateNormalBasedSteepness -> Scalar Field
    source: Scalar Field
    usePhysicalScale: Truth
ScalarField2D CalculateNormalBasedSteepness(
    ScalarField2D source,
    bool usePhysicalScale = true)

Parameters

nametypedefaultdescription
sourceScalar Field—
usePhysicalScaleTruthTrue

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Calculate Normals

Function

This node carries no documentation.

Signature
CalculateNormals -> Vector3 Array Array
    source: Scalar Field
    heightScale: Number
Vector3[][] CalculateNormals(
    ScalarField2D source,
    double heightScale = 1)

Parameters

nametypedefaultdescription
sourceScalar Field—
heightScaleNumber1

Returns

resultVector3 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

Function

This node carries no documentation.

Signature
CalculatePhysicalHeightChange(source: Scalar Field) -> Scalar Field
ScalarField2D CalculatePhysicalHeightChange(ScalarField2D source)

Parameters

nametypedefaultdescription
sourceScalar Field—

Returns

resultScalar 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

Function

Calculates world-space gradient magnitude and normalizes the result to 0-1.
Uses PhysicalScale.

Signature
CalculatePhysicalHeightChangeNormalized(source: Scalar Field) -> Scalar Field
ScalarField2D CalculatePhysicalHeightChangeNormalized(ScalarField2D source)

Parameters

nametypedefaultdescription
sourceScalar Field—

Returns

resultScalar 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

Function

Calculates slope angle in degrees.
Range: 0 to 90.
Uses PhysicalScale by default, so the result represents real terrain angle.

Signature
CalculateSlopeAngleDegrees -> Scalar Field
    source: Scalar Field
    usePhysicalScale: Truth
ScalarField2D CalculateSlopeAngleDegrees(
    ScalarField2D source,
    bool usePhysicalScale = true)

Parameters

nametypedefaultdescription
sourceScalar Field—
usePhysicalScaleTruthTrue

Returns

resultScalar 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

Function

Calculates slope angle in radians.
Range: 0 to PI / 2.
Uses PhysicalScale by default, so the result represents real terrain angle.

Signature
CalculateSlopeAngleRadians -> Scalar Field
    source: Scalar Field
    usePhysicalScale: Truth
ScalarField2D CalculateSlopeAngleRadians(
    ScalarField2D source,
    bool usePhysicalScale = true)

Parameters

nametypedefaultdescription
sourceScalar Field—
usePhysicalScaleTruthTrue

Returns

resultScalar 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

Function

Calculates a derived slope/steepness map from a heightmap.

Signature
CalculateSlopeMap -> Scalar Field
    source: Scalar Field
    slopeMapType: Slope Map Type
ScalarField2D CalculateSlopeMap(
    ScalarField2D source,
    ScalarField2D.SlopeMapType slopeMapType = SlopeMapType.NormalBasedSteepness)

Parameters

nametypedefaultdescription
sourceScalar Field—Source heightmap.
slopeMapTypeSlope Map TypeNormal based steepnessSlope/steepness representation to calculate.

Returns

resultScalar 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

Function

Calculates raw Topographic Wetness Index from routed flow accumulation and terrain slope.

Signature
CalculateTopographicWetnessIndexMap -> Scalar Field
    terrain: Scalar Field
    precipitation: Scalar Field
    rainfallScale: Number
    routingMode: ScalarField2DHydrology.FlowRoutingMode
    mfdExponent: Number
    slopeEpsilon: Number
    usePhysicalScale: Truth
ScalarField2D 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

nametypedefaultdescription
terrainScalar Field—Source terrain.
precipitationScalar Field—Optional rainfall/intensity map. Null means uniform rainfall.
rainfallScaleNumber1Global multiplier for rainfall contribution.
routingModeScalarField2DHydrology.FlowRoutingModeMultiple flow directionFlow routing model.
mfdExponentNumber1.1Multiple-flow-direction concentration exponent.
slopeEpsilonNumber1E-06Minimum slope used to avoid division by zero and extreme flat-terrain values.
usePhysicalScaleTruthTrueIf true, flow and slope use terrain PhysicalScale.

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Calculate Wetness Mask

Function

Creates an artist-friendly 0-1 wetness mask from Topographic Wetness Index percentiles.

Signature
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: Truth
ScalarField2D 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

nametypedefaultdescription
terrainScalar Field—Source terrain.
precipitationScalar Field—Optional rainfall/intensity map. Null means uniform rainfall.
wetnessNumber1Overall wetness multiplier.
routingModeScalarField2DHydrology.FlowRoutingModeMultiple flow directionFlow routing model.
mfdExponentNumber1.1Multiple-flow-direction concentration exponent.
slopeEpsilonNumber1E-06Minimum slope used in the TWI calculation.
dryPercentileNumber0.02TWI percentile mapped to 0.
wetPercentileNumber0.98TWI percentile mapped to 1.
contrastNumber1Centered contrast applied to the final wetness mask.
usePhysicalScaleTruthTrueIf true, flow and slope use terrain PhysicalScale.

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Clamp

Function

This node carries no documentation.

Signature
Clamp -> Scalar Field
    source: Scalar Field
    min: Number
    max: Number
ScalarField2D Clamp(
    ScalarField2D source,
    double min = 0,
    double max = 1)

Parameters

nametypedefaultdescription
sourceScalar Field—
minNumber0
maxNumber1

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Clamp In Place

Function

This node carries no documentation.

Signature
ClampInPlace(heightmap: Scalar Field, min: Number, max: Number)
void ClampInPlace(
    ScalarField2D heightmap,
    double min = 0,
    double max = 1)

Parameters

nametypedefaultdescription
heightmapScalar Field—
minNumber0
maxNumber1
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Clone

Function

This node carries no documentation.

Signature
Clone(source: Scalar Field) -> Scalar Field
ScalarField2D Clone(ScalarField2D source)

Parameters

nametypedefaultdescription
sourceScalar Field—

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Combine Masks

Function

Combines multiple Heightmap masks (value range 0-1) into a single union mask.

Signature
CombineMasks(masks: Scalar Field Array) -> Scalar Field
ScalarField2D CombineMasks(ScalarField2D[] masks)

Parameters

nametypedefaultdescription
masksScalar Field Array—An array of Heightmap masks to combine.

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Contrast

Function

Adjusts height contrast relative to the current elevation range.

Signature
Contrast -> Scalar Field
    source: Scalar Field
    contrast: Number
    pivot: Number
    clampToRange: Truth
ScalarField2D Contrast(
    ScalarField2D source,
    double contrast = 1,
    double pivot = 0.5,
    bool clampToRange = true)

Parameters

nametypedefaultdescription
sourceScalar Field—Source heightmap.
contrastNumber1Contrast factor. 0 flattens to pivot, 1 is unchanged, values greater than 1 increase contrast.
pivotNumber0.5Normalized pivot inside the current range. 0.5 means midpoint.
clampToRangeTruthTrueClamp result back to the original elevation range.

Returns

resultScalar 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

Function

Adjusts height contrast relative to the current elevation range.

Signature
ContrastInPlace
    heightmap: Scalar Field
    contrast: Number
    pivot: Number
    clampToRange: Truth
void ContrastInPlace(
    ScalarField2D heightmap,
    double contrast = 1,
    double pivot = 0.5,
    bool clampToRange = true)

Parameters

nametypedefaultdescription
heightmapScalar Field—Target heightmap.
contrastNumber1Contrast factor. 0 flattens to pivot, 1 is unchanged, values greater than 1 increase contrast.
pivotNumber0.5Normalized pivot inside the current range. 0.5 means midpoint.
clampToRangeTruthTrueClamp 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

Function

Creates a forest suitability mask.
Selects non-water terrain with acceptable slope and enough local flatness for larger vegetation.

Signature
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: Number
ScalarField2D 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

nametypedefaultdescription
terrainScalar Field—Source terrain.
waterMaskScalar Field—Optional 0-1 water mask. If null and excludeWater is true, one is generated.
excludeWaterTruthTrueIf true, water areas are suppressed.
maxSlopeDegreesNumber32Slope angle where forest suitability remains fully allowed.
slopeFalloffDegreesNumber12Slope fade range above maxSlopeDegrees.
flatRadiusInteger4Neighborhood radius in cells used to test local relief.
maxLocalReliefNumber0.04Maximum 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.
localReliefFalloffNumber0.06Fade 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.
clusterMaskScalar Field—Optional 0-1 modulation mask/noise for clustered forest placement.
clusterStrengthNumber0.650 ignores clustering, 1 fully applies cluster suppression.
clusterRadiusInteger8Smooth radius used to favor larger connected forest patches.
clusterContrastNumber1.5Contrast applied to the clustered suitability mask. Values greater than 1 make clusters tighter.
usePhysicalUnitsTruthTrueUse terrain PhysicalScale for slope, hydrology, and water recession distance calculations.
isNormalizedTruthTrueIf true, local relief thresholds are interpreted as normalized 0-1 terrain elevation range values.
recessionFromWaterNumber0(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

resultScalar 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

Function

Creates a terrain flatness mask from local relief.

Signature
CreateLocalReliefMask -> Scalar Field
    terrain: Scalar Field
    radius: Integer
    maxLocalRelief: Number
    falloff: Number
ScalarField2D CreateLocalReliefMask(
    ScalarField2D terrain,
    int radius,
    double maxLocalRelief,
    double falloff)

Parameters

nametypedefaultdescription
terrainScalar Field—Source terrain.
radiusInteger—Neighborhood radius in cells used to measure local min/max relief.
maxLocalReliefNumber—Maximum local height range considered fully suitable.
falloffNumber—Relief range above maxLocalRelief over which the mask fades to 0.

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Create Radial Mask

Function

This node carries no documentation.

Signature
CreateRadialMask -> Scalar Field
    width: Integer
    height: Integer
    centerX: Number
    centerY: Number
    radius: Number
    falloff: Number
    falloffType: HeightmapFalloffType
ScalarField2D 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

nametypedefaultdescription
widthInteger—
heightInteger—
centerXNumber0.5
centerYNumber0.5
radiusNumber0.85
falloffNumber0.15
falloffTypeHeightmapFalloffTypeSmoother step

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Create Snow Mask

Function

Overload 1 of 2

Signature
CreateSnowMask -> Scalar Field
    terrain: Scalar Field
    snowLine: Number
    snowAmount: Number
    snowLineFalloff: Number
    maxSlopeDegrees: Number
    slopeFalloffDegrees: Number
    settleRadius: Integer
    settleIterations: Integer
    smoothing: Number
    usePhysicalUnits: Truth
ScalarField2D 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

nametypedefaultdescription
terrainScalar Field—Source terrain.
snowLineNumber—Elevation where snow begins to accumulate.
snowAmountNumber0.08Maximum snow depth added before settling.
snowLineFalloffNumber0.12Elevation range used to feather snow around the snow line.
maxSlopeDegreesNumber38Slope angle where snow remains fully retained.
slopeFalloffDegreesNumber18Slope fade range above maxSlopeDegrees.
settleRadiusInteger3Smoothing radius used while settling snow surface.
settleIterationsInteger3Number of settling passes.
smoothingNumber0.65Settling smooth strength.
usePhysicalUnitsTruthTrueIf true, slope calculation uses terrain PhysicalScale.

Returns

resultScalar Field

Overload 2 of 2

Signature
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: Truth
ScalarField2D 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

nametypedefaultdescription
terrainScalar Field—Source terrain.
snowLineNumber—Elevation where snow begins to accumulate.
snowAmountNumber0.08Maximum snow depth added before settling.
snowLineFalloffNumber0.12Elevation range used to feather snow around the snow line.
maxSlopeDegreesNumber38Slope angle where snow remains fully retained.
slopeFalloffDegreesNumber18Slope fade range above maxSlopeDegrees.
settleRadiusInteger3Smoothing radius used while settling snow surface.
settleIterationsInteger3Number of settling passes.
smoothingNumber0.65Settling smooth strength.
usePhysicalUnitsTruthTrueIf true, slope calculation uses terrain PhysicalScale.

Returns

resultScalar Field
snowDepthScalar Field
snowSurfaceElevationScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Create Water Mask

Function

Overload 1 of 2

Signature
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: Truth
ScalarField2D 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

nametypedefaultdescription
terrainScalar Field—Source terrain.
precipitationScalar Field—Optional rainfall/intensity map. Null means uniform rainfall.
channelHeadAreaNumber1024Accumulated contributing area where river selection begins.
channelFullAreaNumber0Accumulated contributing area where river mask reaches 1. If less than or equal to zero, channelHeadArea * 8 is used.
rainfallScaleNumber1Global multiplier for rainfall contribution.
dischargeScalarNumber1Multiplier applied to flow accumulation before river selection.
routingModeScalarField2DHydrology.FlowRoutingModeMultiple flow directionFlow routing model.
mfdExponentNumber1.1Multiple-flow-direction concentration exponent.
outletMaskScalar Field—Optional outlet mask. Values at or above outletThreshold are drainage outlets.
useBordersAsOutletsTruthTrueIf true, terrain borders are drainage outlets.
minimumDrainageSlopeNumber1E-05Minimum downhill gradient used when creating the drainable routing surface.
outletThresholdNumber0.5Outlet mask threshold.
minimumLakeDepthNumber0.001Minimum depression fill depth required before a lake appears.
lakeFeatherDepthNumber0.01Depth range over which lake mask ramps from 0 to 1.
includeRiversTruthTrueIf true, include river contribution.
includeLakesTruthTrueIf true, include lake contribution.
usePhysicalUnitsTruthTrueIf true, area and slope values use terrain PhysicalScale.

Returns

resultScalar Field

Overload 2 of 2

Signature
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: Truth
ScalarField2D 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

nametypedefaultdescription
terrainScalar Field—Source terrain.
precipitationScalar Field—Optional rainfall/intensity map. Null means uniform rainfall.
channelHeadAreaNumber1024Accumulated contributing area where river selection begins.
channelFullAreaNumber0Accumulated contributing area where river mask reaches 1. If less than or equal to zero, channelHeadArea * 8 is used.
rainfallScaleNumber1Global multiplier for rainfall contribution.
dischargeScalarNumber1Multiplier applied to flow accumulation before river selection.
routingModeScalarField2DHydrology.FlowRoutingModeMultiple flow directionFlow routing model.
mfdExponentNumber1.1Multiple-flow-direction concentration exponent.
outletMaskScalar Field—Optional outlet mask. Values at or above outletThreshold are drainage outlets.
useBordersAsOutletsTruthTrueIf true, terrain borders are drainage outlets.
minimumDrainageSlopeNumber1E-05Minimum downhill gradient used when creating the drainable routing surface.
outletThresholdNumber0.5Outlet mask threshold.
minimumLakeDepthNumber0.001Minimum depression fill depth required before a lake appears.
lakeFeatherDepthNumber0.01Depth range over which lake mask ramps from 0 to 1.
includeRiversTruthTrueIf true, include river contribution.
includeLakesTruthTrueIf true, include lake contribution.
usePhysicalUnitsTruthTrueIf true, area and slope values use terrain PhysicalScale.

Returns

resultScalar Field
riverMaskScalar Field
lakeMaskScalar Field
waterDepthScalar Field
waterSurfaceElevationScalar Field
flowAccumulationScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Create Water Plane

Function

Simply mask out a water plane based on specified Water Level.
If Is Normalized, then Water Level is between 0-1.

Signature
CreateWaterPlane -> Scalar Field
    terrain: Scalar Field
    waterLevel: Number
    isNormalized: Truth
ScalarField2D CreateWaterPlane(
    ScalarField2D terrain,
    double waterLevel,
    bool isNormalized)

Parameters

nametypedefaultdescription
terrainScalar Field—
waterLevelNumber—
isNormalizedTruth—

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Crop

Function

Crops the source scalar field to the specified rectangular region.

Signature
Crop -> Scalar Field
    source: Scalar Field
    startX: Integer
    startY: Integer
    cropWidth: Integer
    cropHeight: Integer
ScalarField2D Crop(
    ScalarField2D source,
    int startX,
    int startY,
    int cropWidth,
    int cropHeight)

Parameters

nametypedefaultdescription
sourceScalar Field—Source scalar field.
startXInteger—Starting x-coordinate / column index.
startYInteger—Starting y-coordinate / row index.
cropWidthInteger—Cropped width / column count.
cropHeightInteger—Cropped height / row count.

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Curve Adjustment

Function

Applies a normalized level adjustment transfer curve while preserving the current elevation range.

Signature
CurveAdjustment -> Scalar Field
    source: Scalar Field
    curve: Level Adjustment Curve
    strength: Number
ScalarField2D CurveAdjustment(
    ScalarField2D source,
    LevelAdjustmentCurve curve,
    double strength = 1)

Parameters

nametypedefaultdescription
sourceScalar Field—Source heightmap or mask.
curveLevel Adjustment Curve—Normalized 0..1 transfer curve.
strengthNumber10 = unchanged, 1 = full curve adjustment.

Returns

resultScalar 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

Function

Applies a normalized level adjustment transfer curve while preserving the current elevation range.

Signature
CurveAdjustmentInPlace
    heightmap: Scalar Field
    curve: Level Adjustment Curve
    strength: Number
void CurveAdjustmentInPlace(
    ScalarField2D heightmap,
    LevelAdjustmentCurve curve,
    double strength = 1)

Parameters

nametypedefaultdescription
heightmapScalar Field—Target heightmap or mask.
curveLevel Adjustment Curve—Normalized 0..1 transfer curve.
strengthNumber10 = 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

Function

This node carries no documentation.

Overload 1 of 3

Signature
Divide(source: Scalar Field, value: Number) -> Scalar Field
ScalarField2D Divide(ScalarField2D source, double value)

Parameters

nametypedefaultdescription
sourceScalar Field—
valueNumber—

Returns

resultScalar Field

Overload 2 of 3

Signature
Divide(value: Number, source: Scalar Field) -> Scalar Field
ScalarField2D Divide(double value, ScalarField2D source)

Parameters

nametypedefaultdescription
valueNumber—
sourceScalar Field—

Returns

resultScalar Field

Overload 3 of 3

Signature
Divide(a: Scalar Field, b: Scalar Field) -> Scalar Field
ScalarField2D Divide(ScalarField2D a, ScalarField2D b)

Parameters

nametypedefaultdescription
aScalar Field—
bScalar Field—

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Divide In Place

Function

This node carries no documentation.

Overload 1 of 2

Signature
DivideInPlace(target: Scalar Field, value: Number)
void DivideInPlace(ScalarField2D target, double value)

Parameters

nametypedefaultdescription
targetScalar Field—
valueNumber—

Overload 2 of 2

Signature
DivideInPlace(target: Scalar Field, value: Scalar Field)
void DivideInPlace(ScalarField2D target, ScalarField2D value)

Parameters

nametypedefaultdescription
targetScalar Field—
valueScalar Field—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Equalize

Function

Redistributes values by percentile rank while preserving the current elevation range.

Signature
Equalize -> Scalar Field
    source: Scalar Field
    equalization: Number
ScalarField2D Equalize(
    ScalarField2D source,
    double equalization = 1)

Parameters

nametypedefaultdescription
sourceScalar Field—Source heightmap or mask.
equalizationNumber10 = unchanged, 1 = fully equalized.

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Equalize In Place

Function

Redistributes values by percentile rank while preserving the current elevation range.

Signature
EqualizeInPlace(heightmap: Scalar Field, equalization: Number)
void EqualizeInPlace(
    ScalarField2D heightmap,
    double equalization = 1)

Parameters

nametypedefaultdescription
heightmapScalar Field—Target heightmap or mask.
equalizationNumber10 = 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

Function

This node carries no documentation.

Signature
FillInPlace(heightmap: Scalar Field, value: Number)
void FillInPlace(ScalarField2D heightmap, double value)

Parameters

nametypedefaultdescription
heightmapScalar Field—
valueNumber—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Filter By Height

Function

Overload 1 of 2

Signature
FilterByHeight -> Scalar Field
    heightMap: Scalar Field
    rule: Height Filter Rule
    value: Number
    fade: Number
ScalarField2D 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

nametypedefaultdescription
heightMapScalar Field—
ruleHeight Filter Rule—Min or Max.
valueNumber—The height value.
fadeNumber0Optional fade distance.

Returns

resultScalar Field

Overload 2 of 2

Signature
FilterByHeight -> Scalar Field
    heightMap: Scalar Field
    minHeight: Number
    maxHeight: Number
    fade: Number
ScalarField2D FilterByHeight(
    ScalarField2D heightMap,
    double minHeight,
    double maxHeight,
    double fade = 0)

Filters the heightmap based on a height range with an optional fade.

Parameters

nametypedefaultdescription
heightMapScalar Field—
minHeightNumber—Minimum height value.
maxHeightNumber—Maximum height value.
fadeNumber0Optional fade distance.

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Filter By Slope

Function

Overload 1 of 2

Signature
FilterBySlope -> Scalar Field
    heightMap: Scalar Field
    minSlope: Number
    maxSlope: Number
    fade: Number
ScalarField2D 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

nametypedefaultdescription
heightMapScalar Field—Source terrain.
minSlopeNumber—Minimum slope in degrees.
maxSlopeNumber—Maximum slope in degrees.
fadeNumber0Optional fade distance (in degrees).

Returns

resultScalar Field

Remarks

Filter slope angle in degrees.
Per HeightmapOperations.CalculateSlopeAngleDegrees

Overload 2 of 2

Signature
FilterBySlope -> Scalar Field
    source: Scalar Field
    slopeType: Slope Map Type
    minSlope: Number
    maxSlope: Number
    falloff: Number
ScalarField2D FilterBySlope(
    ScalarField2D source,
    ScalarField2D.SlopeMapType slopeType,
    double minSlope = 0,
    double maxSlope = 1,
    double falloff = 0)

This node carries no documentation.

Parameters

nametypedefaultdescription
sourceScalar Field—
slopeTypeSlope Map Type—
minSlopeNumber0
maxSlopeNumber1
falloffNumber0

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Filter By Value

Function

This node carries no documentation.

Signature
FilterByValue -> Scalar Field
    source: Scalar Field
    minValue: Number
    maxValue: Number
    falloff: Number
ScalarField2D FilterByValue(
    ScalarField2D source,
    double minValue,
    double maxValue,
    double falloff = 0)

Parameters

nametypedefaultdescription
sourceScalar Field—
minValueNumber—
maxValueNumber—
falloffNumber0The `falloff` parameter softens the mask edges outside the [minValue, maxValue] range

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Subtract by 1

Function

Invert by subtracting from 1.

Signature
Invert(source: Scalar Field) -> Scalar Field
ScalarField2D Invert(ScalarField2D source)

Parameters

nametypedefaultdescription
sourceScalar Field—

Returns

resultScalar 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

Function

This node carries no documentation.

Signature
InvertRange(source: Scalar Field) -> Scalar Field
ScalarField2D InvertRange(ScalarField2D source)

Parameters

nametypedefaultdescription
sourceScalar Field—

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Make Drainage

Function

Modifies terrain in place so non-outlet cells can drain toward an outlet.

Signature
MakeDrainage -> Scalar Field
    source: Scalar Field
    outletMask: Scalar Field
    useBordersAsOutlets: Truth
    minimumDrainageSlope: Number
    strength: Number
    outletThreshold: Number
    usePhysicalScale: Truth
ScalarField2D MakeDrainage(
    ScalarField2D source,
    ScalarField2D outletMask,
    bool useBordersAsOutlets = true,
    double minimumDrainageSlope = 1E-05,
    double strength = 1,
    double outletThreshold = 0.5,
    bool usePhysicalScale = true)

Parameters

nametypedefaultdescription
sourceScalar Field—Source terrain to generate from.
outletMaskScalar Field—Optional outlet mask. Values at or above outletThreshold are drainage targets.
useBordersAsOutletsTruthTrueIf true, terrain borders are drainage targets.
minimumDrainageSlopeNumber1E-05Minimum downhill gradient in height units per horizontal unit.
strengthNumber1Blend from original terrain to corrected drainage terrain. 1 applies the full correction.
outletThresholdNumber0.5Outlet mask threshold.
usePhysicalScaleTruthTrueIf true, minimumDrainageSlope is interpreted per PhysicalScale world unit.

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Make Drainage In Place

Function

Modifies terrain in place so non-outlet cells can drain toward an outlet.

Signature
MakeDrainageInPlace
    target: Scalar Field
    outletMask: Scalar Field
    useBordersAsOutlets: Truth
    minimumDrainageSlope: Number
    strength: Number
    outletThreshold: Number
    usePhysicalScale: Truth
void MakeDrainageInPlace(
    ScalarField2D target,
    ScalarField2D outletMask,
    bool useBordersAsOutlets = true,
    double minimumDrainageSlope = 1E-05,
    double strength = 1,
    double outletThreshold = 0.5,
    bool usePhysicalScale = true)

Parameters

nametypedefaultdescription
targetScalar Field—Target terrain to modify.
outletMaskScalar Field—Optional outlet mask. Values at or above outletThreshold are drainage targets.
useBordersAsOutletsTruthTrueIf true, terrain borders are drainage targets.
minimumDrainageSlopeNumber1E-05Minimum downhill gradient in height units per horizontal unit.
strengthNumber1Blend from original terrain to corrected drainage terrain. 1 applies the full correction.
outletThresholdNumber0.5Outlet mask threshold.
usePhysicalScaleTruthTrueIf 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

Function

Creates a terraced copy while preserving the source elevation range.

Signature
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: Number
ScalarField2D 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

nametypedefaultdescription
sourceScalar Field—
terraceCountInteger8
strengthNumber1
methodHeightmapOperations.TerraceMethodSharp
terraceShapeNumber0.75
layerModeHeightmapOperations.TerraceLayerModeUniform
layerBiasNumber0
maskScalar Field—
terraceModulationScalar Field—
modulationStrengthNumber0

Returns

resultScalar 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

Function

Applies terrace shaping in place while preserving the current elevation range.

Signature
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: Number
void 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

nametypedefaultdescription
targetScalar Field—Target heightmap.
terraceCountInteger8Number of terrace levels.
strengthNumber10 = unchanged, 1 = fully terraced.
methodHeightmapOperations.TerraceMethodSharpSharp concentrates the riser near the top of each terrace band; Smooth centers and softens the riser.
terraceShapeNumber0.750 = soft/continuous, 1 = broad flats with narrow risers.
layerModeHeightmapOperations.TerraceLayerModeUniformControls non-uniform vertical terrace spacing.
layerBiasNumber00 = uniform spacing, 1 = strongest layer distribution bias.
maskScalar Field—Optional 0-1 mask controlling local effect strength.
terraceModulationScalar Field—Optional 0-1 modulation map shifting terrace bands locally.
modulationStrengthNumber0Terrace-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

Function

This node carries no documentation.

Overload 1 of 2

Signature
Multiply(source: Scalar Field, value: Number) -> Scalar Field
ScalarField2D Multiply(ScalarField2D source, double value)

Parameters

nametypedefaultdescription
sourceScalar Field—
valueNumber—

Returns

resultScalar Field

Overload 2 of 2

Signature
Multiply(a: Scalar Field, b: Scalar Field) -> Scalar Field
ScalarField2D Multiply(ScalarField2D a, ScalarField2D b)

Parameters

nametypedefaultdescription
aScalar Field—
bScalar Field—

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Multiply In Place

Function

This node carries no documentation.

Overload 1 of 2

Signature
MultiplyInPlace(target: Scalar Field, mask: Scalar Field)
void MultiplyInPlace(ScalarField2D target, ScalarField2D mask)

Parameters

nametypedefaultdescription
targetScalar Field—
maskScalar Field—

Overload 2 of 2

Signature
MultiplyInPlace(target: Scalar Field, value: Number)
void MultiplyInPlace(ScalarField2D target, double value)

Parameters

nametypedefaultdescription
targetScalar Field—
valueNumber—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Negate

Function

Negates all values.

Signature
Negate(source: Scalar Field) -> Scalar Field
ScalarField2D Negate(ScalarField2D source)

Parameters

nametypedefaultdescription
sourceScalar Field—

Returns

resultScalar 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

Function

This node carries no documentation.

Signature
Normalize -> Scalar Field
    source: Scalar Field
    newMin: Number
    newMax: Number
ScalarField2D Normalize(
    ScalarField2D source,
    double newMin = 0,
    double newMax = 1)

Parameters

nametypedefaultdescription
sourceScalar Field—
newMinNumber0
newMaxNumber1

Returns

resultScalar 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

Function

Rescale entire height field to fit in height range.

Signature
NormalizeInPlace
    heightmap: Scalar Field
    newMin: Number
    newMax: Number
void NormalizeInPlace(
    ScalarField2D heightmap,
    double newMin = 0,
    double newMax = 1)

Parameters

nametypedefaultdescription
heightmapScalar Field—
newMinNumber0
newMaxNumber1
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Power

Function

This node carries no documentation.

Signature
Power(source: Scalar Field, exponent: Number) -> Scalar Field
ScalarField2D Power(ScalarField2D source, double exponent)

Parameters

nametypedefaultdescription
sourceScalar Field—
exponentNumber—

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Replace In Place

Function

Replace data from flattened array.

Overload 1 of 2

Signature
ReplaceInPlace
    heightmap: Scalar Field
    ldData: Low Accuracy Number Array
void ReplaceInPlace(ScalarField2D heightmap, float[] ldData)

Parameters

nametypedefaultdescription
heightmapScalar Field—
ldDataLow Accuracy Number Array—

Overload 2 of 2

Signature
ReplaceInPlace(heightmap: Scalar Field, hdData: Number Array)
void ReplaceInPlace(ScalarField2D heightmap, double[] hdData)

Parameters

nametypedefaultdescription
heightmapScalar Field—
hdDataNumber Array—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Resize

Function

Resizes the source scalar field to the specified dimensions.

Signature
Resize -> Scalar Field
    source: Scalar Field
    newWidth: Integer
    newHeight: Integer
    interpolation: ScalarField2D.HeightmapResizeInterpolation
    preserveElevationRange: Truth
    physicalScale: Number
ScalarField2D Resize(
    ScalarField2D source,
    int newWidth,
    int newHeight,
    ScalarField2D.HeightmapResizeInterpolation interpolation = HeightmapResizeInterpolation.Bilinear,
    bool preserveElevationRange = false,
    double physicalScale = 1)

Parameters

nametypedefaultdescription
sourceScalar Field—Source scalar field.
newWidthInteger—New width / column count.
newHeightInteger—New height / row count.
interpolationScalarField2D.HeightmapResizeInterpolationBilinearInterpolation method.
preserveElevationRangeTruthFalseRescales result so original min/max elevation remains unchanged.
physicalScaleNumber1Sets the new physical scale.

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Smooth

Function

Useful on low-resolution imports.

Signature
Smooth -> Scalar Field
    source: Scalar Field
    radius: Integer
    strength: Number
ScalarField2D Smooth(
    ScalarField2D source,
    int radius = 1,
    double strength = 1)

Parameters

nametypedefaultdescription
sourceScalar Field—
radiusInteger1
strengthNumber1

Returns

resultScalar 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

Function

Creates a more densely subdivided scalar field while preserving its overall physical dimensions.

Signature
Subdivide -> Scalar Field
    source: Scalar Field
    factor: Integer
    interpolation: ScalarField2D.HeightmapResizeInterpolation
    preserveElevationRange: Truth
ScalarField2D Subdivide(
    ScalarField2D source,
    int factor = 2,
    ScalarField2D.HeightmapResizeInterpolation interpolation = HeightmapResizeInterpolation.Bilinear,
    bool preserveElevationRange = false)

Parameters

nametypedefaultdescription
sourceScalar Field—Source scalar field.
factorInteger2Number of cells created along each axis for every existing cell.
interpolationScalarField2D.HeightmapResizeInterpolationBilinearInterpolation method.
preserveElevationRangeTruthFalseRescales the result so the original minimum and maximum elevations remain unchanged.

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Subdivide In Place

Function

Subdivides the target scalar field in place while preserving its overall physical dimensions.

Signature
SubdivideInPlace
    target: Scalar Field
    factor: Integer
    interpolation: ScalarField2D.HeightmapResizeInterpolation
    preserveElevationRange: Truth
void SubdivideInPlace(
    ScalarField2D target,
    int factor = 2,
    ScalarField2D.HeightmapResizeInterpolation interpolation = HeightmapResizeInterpolation.Bilinear,
    bool preserveElevationRange = false)

Parameters

nametypedefaultdescription
targetScalar Field—
factorInteger2
interpolationScalarField2D.HeightmapResizeInterpolationBilinear
preserveElevationRangeTruthFalse
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Subtract

Function

This node carries no documentation.

Overload 1 of 3

Signature
Subtract(source: Scalar Field, value: Number) -> Scalar Field
ScalarField2D Subtract(ScalarField2D source, double value)

Parameters

nametypedefaultdescription
sourceScalar Field—
valueNumber—

Returns

resultScalar Field

Overload 2 of 3

Signature
Subtract(value: Number, source: Scalar Field) -> Scalar Field
ScalarField2D Subtract(double value, ScalarField2D source)

Parameters

nametypedefaultdescription
valueNumber—
sourceScalar Field—

Returns

resultScalar Field

Overload 3 of 3

Signature
Subtract(a: Scalar Field, b: Scalar Field) -> Scalar Field
ScalarField2D Subtract(ScalarField2D a, ScalarField2D b)

Parameters

nametypedefaultdescription
aScalar Field—
bScalar Field—

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Subtract In Place

Function

This node carries no documentation.

Overload 1 of 2

Signature
SubtractInPlace(target: Scalar Field, value: Number)
void SubtractInPlace(ScalarField2D target, double value)

Parameters

nametypedefaultdescription
targetScalar Field—
valueNumber—

Overload 2 of 2

Signature
SubtractInPlace(target: Scalar Field, value: Scalar Field)
void SubtractInPlace(ScalarField2D target, ScalarField2D value)

Parameters

nametypedefaultdescription
targetScalar Field—
valueScalar Field—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Terrace

Function

This node carries no documentation.

Signature
Terrace -> Scalar Field
    source: Scalar Field
    terraceCount: Integer
    strength: Number
ScalarField2D Terrace(
    ScalarField2D source,
    int terraceCount,
    double strength = 1)

Parameters

nametypedefaultdescription
sourceScalar Field—
terraceCountInteger—
strengthNumber1

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation

Threshold

Function

Creates a binary mask by converting values below the threshold to 0 and values at or above the threshold to 1.

Signature
Threshold -> Scalar Field
    waterField: Scalar Field
    threshold: Number
ScalarField2D Threshold(
    ScalarField2D waterField,
    double threshold)

Parameters

nametypedefaultdescription
waterFieldScalar Field—The source scalar field containing mask values.
thresholdNumber—The inclusive threshold used to classify values as 1.

Returns

resultScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Heightmap Operations
Package
Procedural Generation