Scalar Field
61 nodes
On this page 61
Physical Scale
FunctionMeters per unit cell.
This applies only to width and "height" of the heightmap grid, not physical height.
PhysicalScale(Scalar Field: Scalar Field) -> Number
double PhysicalScale(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Number |
Remarks
Recommended range for large scale terrain work: 1m/px to 10m/px.
As a reference, a 2K heightmap representing 4km square landscape should use a ScalarField2D.PhysicalScale of 2, aka. 2 meters per unit cell.
Use lower value (e.g. 0.5) if we wish to represent dense details on smaller regions.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Make Scalar Field
FunctionOverload 1 of 2
ScalarField2D(width: Integer, height: Integer) -> Scalar Field
ScalarField2D ScalarField2D(int width, int height)
Initializes a new instance of the Heightmap class with the specified dimensions.
Parameters
| name | type | default | description |
|---|---|---|---|
| width | Integer | — | The width (number of columns) of the heightmap. |
| height | Integer | — | The height (number of rows) of the heightmap. |
Returns
| result | Scalar Field |
Overload 2 of 2
ScalarField2D(initialData: Number Array Array) -> Scalar Field
ScalarField2D ScalarField2D(double[][] initialData)
Initializes a new instance of the Heightmap class with the specified data.
Parameters
| name | type | default | description |
|---|---|---|---|
| initialData | Number Array Array | — | A jagged array of doubles representing the heightmap data. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Add
FunctionAdds another heightmap to this heightmap, element-wise.
Add(Scalar Field: Scalar Field, other: Scalar Field)
void Add(ScalarField2D Scalar Field, ScalarField2D other)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| other | Scalar Field | — | The other heightmap to add. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Apply
FunctionApplies a custom transformation function to each height value in the heightmap.
Overload 1 of 2
Apply
Scalar Field: Scalar Field
transform: Func<Number, Number>void Apply(
ScalarField2D Scalar Field,
Func<double, double> transform)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| transform | Func<Number, Number> | — | The function to apply to each height value. |
Overload 2 of 2
Apply
Scalar Field: Scalar Field
transform: Func<Integer, Integer, Number, Number>void Apply(
ScalarField2D Scalar Field,
Func<int, int, double, double> transform)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| transform | Func<Integer, Integer, Number, Number> | — | The function to apply to each height value. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Clone
FunctionClones the heightmap, creating a deep copy.
Clone(Scalar Field: Scalar Field) -> Scalar Field
ScalarField2D Clone(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Create Template
FunctionCreates a heightmap with same dimensions and attributes but initialized with fresh empty data.
CreateTemplate -> Scalar Field
Scalar Field: Scalar Field
newUsage: TextScalarField2D CreateTemplate(
ScalarField2D Scalar Field,
string newUsage)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| newUsage | Text | — |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Crop
FunctionCrops the heightmap to the specified rectangular region.
Crop -> Scalar Field
Scalar Field: Scalar Field
startX: Integer
startY: Integer
cropWidth: Integer
cropHeight: IntegerScalarField2D Crop(
ScalarField2D Scalar Field,
int startX,
int startY,
int cropWidth,
int cropHeight)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| startX | Integer | — | The starting x-coordinate (column index). |
| startY | Integer | — | The starting y-coordinate (row index). |
| cropWidth | Integer | — | The width of the cropped region. |
| cropHeight | Integer | — | The height of the cropped region. |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Erode Brush
FunctionOverload 1 of 2
ErodeBrush
Scalar Field: Scalar Field
centerX: Integer
centerY: Integer
radius: Integer
falloff: Number
brushShape: ScalarField2D.PaintbrushShapevoid ErodeBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)Simple erosion
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| centerX | Integer | — | |
| centerY | Integer | — | |
| radius | Integer | — | |
| falloff | Number | — | |
| brushShape | ScalarField2D.PaintbrushShape | Circle |
Overload 2 of 2
ErodeBrush
Scalar Field: Scalar Field
centerX: Integer
centerY: Integer
radius: Integer
falloff: Number
iterations: Integer
talusAngle: Number
erosionFactor: Number
brushShape: ScalarField2D.PaintbrushShapevoid ErodeBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
int iterations,
double talusAngle,
double erosionFactor,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)Applies thermal erosion within a brush area.
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| centerX | Integer | — | The x-coordinate of the brush center. |
| centerY | Integer | — | The y-coordinate of the brush center. |
| radius | Integer | — | The radius of the brush. |
| falloff | Number | — | The fall-off parameter (0 to 1). |
| iterations | Integer | — | The number of erosion iterations to perform. |
| talusAngle | Number | — | The maximum stable slope (in height units). |
| erosionFactor | Number | — | Controls how much material moves per iteration (0 to 1). |
| brushShape | ScalarField2D.PaintbrushShape | Circle | The shape of the brush ("circle" or "rectangle"). |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Flatten Brush
FunctionFlattens the terrain within a brush area to a target height.
FlattenBrush
Scalar Field: Scalar Field
centerX: Integer
centerY: Integer
radius: Integer
falloff: Number
targetHeight: Number
brushShape: ScalarField2D.PaintbrushShapevoid FlattenBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
double targetHeight,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| centerX | Integer | — | The x-coordinate of the brush center. |
| centerY | Integer | — | The y-coordinate of the brush center. |
| radius | Integer | — | The radius of the brush. |
| falloff | Number | — | The fall-off parameter (0 to 1). |
| targetHeight | Number | — | The target height to flatten to. |
| brushShape | ScalarField2D.PaintbrushShape | Circle | The shape of the brush ("circle" or "rectangle"). |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Columns
FunctionGets the width of the heightmap (number of columns).
Columns(Scalar Field: Scalar Field) -> Integer
int Columns(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Data
FunctionRow-major: height (y), width (x).
Data(Scalar Field: Scalar Field) -> Number Array Array
double[][] Data(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Number Array Array |
Remarks
Every read of the values goes through here, the field's own members' included, so a field whose values are kept elsewhere - on the graphics card, where a GPU kernel left them (round 26) - brings them here the first time anything reads it, and from then on is an ordinary field.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Elevations
FunctionThis node carries no documentation.
Elevations(Scalar Field: Scalar Field) -> ScalarField2D.ElevationRange
ScalarField2D.ElevationRange Elevations(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | ScalarField2D.ElevationRange |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Is Normalized
FunctionGets whether all values in this scalar field are valid normalized values in the inclusive 0..1 range.
IsNormalized(Scalar Field: Scalar Field) -> Truth
bool IsNormalized(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Truth |
Remarks
This does not require the field minimum to be exactly 0 or the maximum to be exactly 1.
A constant mask value such as 0.5 is considered normalized because it is already directly usable as opacity.
Non-finite values are never considered normalized.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Is Square
FunctionOccassionally useful due to output engine requirements - some usage scenarios require square maps.
IsSquare(Scalar Field: Scalar Field) -> Truth
bool IsSquare(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Item
FunctionGets or sets the height value at the specified (x, y) coordinate.
Item -> Number
Scalar Field: Scalar Field
x: Integer
y: Integerdouble Item(ScalarField2D Scalar Field, int x, int y)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| x | Integer | — | The x-coordinate (column index). |
| y | Integer | — | The y-coordinate (row index). |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Rows
FunctionGets the height of the heightmap (number of rows).
Rows(Scalar Field: Scalar Field) -> Integer
int Rows(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Usage
FunctionAn indicator what this heightmap is used for.
Some valid values: Height, Mask, Slope/Steepness, Wetness, etc.
Usage(Scalar Field: Scalar Field) -> Text
string Usage(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Text |
Remarks
Currently only for display purpose; No functional distinction.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get World Depth
FunctionThis node carries no documentation.
WorldDepth(Scalar Field: Scalar Field) -> Number
double WorldDepth(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get World Width
FunctionThis node carries no documentation.
WorldWidth(Scalar Field: Scalar Field) -> Number
double WorldWidth(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Angle Degree
FunctionCalculates the slope angle in degrees based on the gradient at a given point.
GetAngleDegree -> Number
Scalar Field: Scalar Field
x: Integer
y: Integerdouble GetAngleDegree(ScalarField2D Scalar Field, int x, int y)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| x | Integer | — | The x-coordinate (column index). |
| y | Integer | — | The y-coordinate (row index). |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Average Height
FunctionGets the average height value of the heightmap.
GetAverageHeight(Scalar Field: Scalar Field) -> Number
double GetAverageHeight(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Color
FunctionThis node carries no documentation.
GetColor -> Color
Scalar Field: Scalar Field
x: Integer
y: IntegerColorElement GetColor(ScalarField2D Scalar Field, int x, int y)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| x | Integer | — | |
| y | Integer | — |
Returns
| result | Color |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Data As Arrays
FunctionGets a copy of data.
GetDataAsArrays(Scalar Field: Scalar Field) -> Number Array Array
double[][] GetDataAsArrays(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Number Array Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Data As Arrays LD
FunctionGets a copy of data in floats.
GetDataAsArraysLD(Scalar Field: Scalar Field) -> Low Accuracy Number Array Array
float[][] GetDataAsArraysLD(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Low Accuracy Number Array Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Float Value
FunctionThis is very slow!
GetFloatValue -> Low Accuracy Number
Scalar Field: Scalar Field
x: Integer
y: Integerfloat GetFloatValue(ScalarField2D Scalar Field, int x, int y)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| x | Integer | — | |
| y | Integer | — |
Returns
| result | Low Accuracy Number |
Remarks
Currently this is very slow, e.g. when used with `PixelImageSampling.GetGrayClamped` on `ImageFilter.DirectionalGradientSmudge`. It's recommended to conver the Topology.ScalarField2D to a grayscale image first.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Gradient
FunctionGets the gradient (partial derivatives) at the specified (x, y) coordinate.
GetGradient -> (Number, Number)
Scalar Field: Scalar Field
x: Integer
y: Integer
usePhysicalScale: Truth(double, double) GetGradient(
ScalarField2D Scalar Field,
int x,
int y,
bool usePhysicalScale = true)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| x | Integer | — | The x-coordinate (column index). |
| y | Integer | — | The y-coordinate (row index). |
| usePhysicalScale | Truth | True |
Returns
| result | (Number, Number) |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Gradient Magnitude
FunctionThis node carries no documentation.
GetGradientMagnitude -> Number
Scalar Field: Scalar Field
x: Integer
y: Integer
usePhysicalScale: Truthdouble GetGradientMagnitude(
ScalarField2D Scalar Field,
int x,
int y,
bool usePhysicalScale)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| x | Integer | — | |
| y | Integer | — | |
| usePhysicalScale | Truth | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Gray Byte
FunctionThis node carries no documentation.
GetGrayByte -> Byte
Scalar Field: Scalar Field
x: Integer
y: Integerbyte GetGrayByte(ScalarField2D Scalar Field, int x, int y)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| x | Integer | — | |
| y | Integer | — |
Returns
| result | Byte |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Height Change
FunctionThis node carries no documentation.
GetHeightChange -> Number
Scalar Field: Scalar Field
x: Integer
y: Integerdouble GetHeightChange(ScalarField2D Scalar Field, int x, int y)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| x | Integer | — | |
| y | Integer | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Max Height
FunctionGets the maximum height value in the heightmap.
GetMaxHeight(Scalar Field: Scalar Field) -> Number
double GetMaxHeight(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Number |
Remarks
Consider using ScalarField2D.Elevations
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Min Height
FunctionGets the minimum height value in the heightmap.
GetMinHeight(Scalar Field: Scalar Field) -> Number
double GetMinHeight(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Number |
Remarks
Consider using ScalarField2D.Elevations
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Normal
FunctionOverload 1 of 2
GetNormal -> (Number, Number, Number)
Scalar Field: Scalar Field
x: Integer
y: Integer(double, double, double) GetNormal(
ScalarField2D Scalar Field,
int x,
int y)Gets the normal vector at the specified (x, y) coordinate.
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| x | Integer | — | The x-coordinate (column index). |
| y | Integer | — | The y-coordinate (row index). |
Returns
| result | (Number, Number, Number) |
Overload 2 of 2
GetNormal -> Vector3dhd
Scalar Field: Scalar Field
p1: Vector3dhd
p2: Vector3dhd
p3: Vector3dhdVector3DHD GetNormal(
ScalarField2D Scalar Field,
Vector3DHD p1,
Vector3DHD p2,
Vector3DHD p3)Computes the normal vector of a triangle defined by three 3D points.
Points should be specified in counter-clockwise order to ensure the normal points outward (right-hand rule).
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| p1 | Vector3dhd | — | |
| p2 | Vector3dhd | — | |
| p3 | Vector3dhd | — |
Returns
| result | Vector3dhd |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Physical Height Change
FunctionThis node carries no documentation.
GetPhysicalHeightChange -> Number
Scalar Field: Scalar Field
x: Integer
y: Integerdouble GetPhysicalHeightChange(
ScalarField2D Scalar Field,
int x,
int y)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| x | Integer | — | |
| y | Integer | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Value
FunctionGets the height value at the specified (x, y) coordinate.
GetValue -> Number
Scalar Field: Scalar Field
x: Integer
y: Integerdouble GetValue(ScalarField2D Scalar Field, int x, int y)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| x | Integer | — | The x-coordinate (column index). |
| y | Integer | — | The y-coordinate (row index). |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Z
FunctionThis node carries no documentation.
GetZ -> Low Accuracy Number
Scalar Field: Scalar Field
x: Low Accuracy Number
y: Low Accuracy Numberfloat GetZ(ScalarField2D Scalar Field, float x, float y)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| x | Low Accuracy Number | — | |
| y | Low Accuracy Number | — |
Returns
| result | Low Accuracy Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Interpolate Height
FunctionInterpolates the height value at the specified (x, y) coordinate using bilinear interpolation.
InterpolateHeight -> Number
Scalar Field: Scalar Field
x: Number
y: Numberdouble InterpolateHeight(
ScalarField2D Scalar Field,
double x,
double y)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| x | Number | — | The x-coordinate (can be fractional). |
| y | Number | — | The y-coordinate (can be fractional). |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Noise Brush
FunctionThis node carries no documentation.
NoiseBrush
Scalar Field: Scalar Field
centerX: Integer
centerY: Integer
radius: Integer
falloff: Number
noiseAmplitude: Number
brushShape: ScalarField2D.PaintbrushShapevoid NoiseBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
double noiseAmplitude,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| centerX | Integer | — | |
| centerY | Integer | — | |
| radius | Integer | — | |
| falloff | Number | — | |
| noiseAmplitude | Number | — | |
| brushShape | ScalarField2D.PaintbrushShape | Circle |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Normalize In Place With Clamp
FunctionNormalizes every value in _heightData in place so the result is between 0.0 and 1.0 (as specified by Max Value).
For data values smaller than zero, it becomes 0.
NormalizeInPlaceWithClamp
Scalar Field: Scalar Field
maxValue: Numbervoid NormalizeInPlaceWithClamp(
ScalarField2D Scalar Field,
double maxValue)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| maxValue | Number | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Raise Lower Brush
FunctionRaises or lowers the terrain within a brush area.
RaiseLowerBrush
Scalar Field: Scalar Field
centerX: Integer
centerY: Integer
radius: Integer
falloff: Number
deltaHeight: Number
brushShape: ScalarField2D.PaintbrushShapevoid RaiseLowerBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
double deltaHeight,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| centerX | Integer | — | The x-coordinate of the brush center. |
| centerY | Integer | — | The y-coordinate of the brush center. |
| radius | Integer | — | The radius of the brush. |
| falloff | Number | — | The fall-off parameter (0 to 1). |
| deltaHeight | Number | — | The amount to raise or lower the height. |
| brushShape | ScalarField2D.PaintbrushShape | Circle | The shape of the brush ("circle" or "rectangle"). |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Resize
FunctionOverload 1 of 2
Resize
Scalar Field: Scalar Field
newWidth: Integer
newHeight: Integervoid Resize(
ScalarField2D Scalar Field,
int newWidth,
int newHeight)Resizes the heightmap to the specified dimensions using nearest neighbor scaling.
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| newWidth | Integer | — | The new width (number of columns). |
| newHeight | Integer | — | The new height (number of rows). |
Overload 2 of 2
Resize
Scalar Field: Scalar Field
newWidth: Integer
newHeight: Integer
interpolation: ScalarField2D.HeightmapResizeInterpolation
preserveElevationRange: Truthvoid Resize(
ScalarField2D Scalar Field,
int newWidth,
int newHeight,
ScalarField2D.HeightmapResizeInterpolation interpolation = HeightmapResizeInterpolation.Bilinear,
bool preserveElevationRange = false)Resizes the heightmap to the specified dimensions.
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| newWidth | Integer | — | The new width (number of columns). |
| newHeight | Integer | — | The new height (number of rows). |
| interpolation | ScalarField2D.HeightmapResizeInterpolation | Bilinear | Interpolation method. |
| preserveElevationRange | Truth | False | Prescales result so original min/max elevation remains unchanged. Only neeed as a post to ensure exact min/max elevations, otherwise matters not. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Rotate CCW
FunctionRotates the heightmap data 90 degrees counterclockwise.
RotateCCW(Scalar Field: Scalar Field)
void RotateCCW(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Rotate CW
FunctionRotates the heightmap data 90 degrees clockwise.
RotateCW(Scalar Field: Scalar Field)
void RotateCW(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Sample Bilinear Clamped
FunctionBilinearly samples the field using grid coordinates and clamps samples at the outer border.
SampleBilinearClamped -> Number
Scalar Field: Scalar Field
x: Number
y: Numberdouble SampleBilinearClamped(
ScalarField2D Scalar Field,
double x,
double y)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| x | Number | — | |
| y | Number | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Sample World Bilinear Clamped
FunctionBilinearly samples the field using physical world coordinates.
Cell values are treated as samples located at cell centres.
SampleWorldBilinearClamped -> Number
Scalar Field: Scalar Field
worldX: Number
worldY: Numberdouble SampleWorldBilinearClamped(
ScalarField2D Scalar Field,
double worldX,
double worldY)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| worldX | Number | — | |
| worldY | Number | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Scale Heights
FunctionScales the heightmap vertically by the specified factor.
ScaleHeights(Scalar Field: Scalar Field, scale: Number)
void ScaleHeights(ScalarField2D Scalar Field, double scale)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| scale | Number | — | The scale factor to apply. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Set Value
FunctionSets the height value at the specified (x, y) coordinate.
SetValue
Scalar Field: Scalar Field
x: Integer
y: Integer
value: Numbervoid SetValue(
ScalarField2D Scalar Field,
int x,
int y,
double value)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| x | Integer | — | The x-coordinate (column index). |
| y | Integer | — | The y-coordinate (row index). |
| value | Number | — | The height value to set. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Smooth
FunctionSmooths the heightmap using a simple averaging filter.
Smooth(Scalar Field: Scalar Field)
void Smooth(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Smooth Brush
FunctionApplies a smoothing operation within a brush area.
SmoothBrush
Scalar Field: Scalar Field
centerX: Integer
centerY: Integer
radius: Integer
falloff: Number
brushShape: ScalarField2D.PaintbrushShapevoid SmoothBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| centerX | Integer | — | The x-coordinate of the brush center. |
| centerY | Integer | — | The y-coordinate of the brush center. |
| radius | Integer | — | The radius of the brush. |
| falloff | Number | — | The fall-off parameter (0 to 1). |
| brushShape | ScalarField2D.PaintbrushShape | Circle | The shape of the brush ("Circle" or "Rectangle"). |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Subdivide
FunctionSubdivides each heightmap cell into a finer grid while preserving the overall physical dimensions.
Subdivide
Scalar Field: Scalar Field
factor: Integer
interpolation: ScalarField2D.HeightmapResizeInterpolation
preserveElevationRange: Truthvoid Subdivide(
ScalarField2D Scalar Field,
int factor = 2,
ScalarField2D.HeightmapResizeInterpolation interpolation = HeightmapResizeInterpolation.Bilinear,
bool preserveElevationRange = false)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| factor | Integer | 2 | Number of cells created along each axis for every existing cell. Must be greater than or equal to 1. |
| interpolation | ScalarField2D.HeightmapResizeInterpolation | Bilinear | Interpolation method used to generate the additional samples. |
| preserveElevationRange | Truth | False | Rescales the result so the original minimum and maximum elevations remain unchanged. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Summarize
FunctionReturns a technical summary of the heightmap, one parameter per line.
Summarize(Scalar Field: Scalar Field) -> Text
string Summarize(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
To Flatten Array
FunctionFlattened array.
ToFlattenArray(Scalar Field: Scalar Field) -> Number Array
double[] ToFlattenArray(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Number Array |
Remarks
Used for high-performance purposes.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
To Flatten Array LD
FunctionFlattened array.
ToFlattenArrayLD(Scalar Field: Scalar Field) -> Low Accuracy Number Array
float[] ToFlattenArrayLD(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Low Accuracy Number Array |
Remarks
Used for high-performance purposes.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
To Pixel Image
FunctionThis node carries no documentation.
ToPixelImage(Scalar Field: Scalar Field) -> Pixel Image
PixelImage ToPixelImage(ScalarField2D Scalar Field)
Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Modify as Color Data
FunctionThis node carries no documentation.
UpdateColorData
Scalar Field: Scalar Field
updater: Func<Color Array Array, Color Array Array>void UpdateColorData(
ScalarField2D Scalar Field,
Func<ColorElement[][], ColorElement[][]> updater)Parameters
| name | type | default | description |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| updater | Func<Color Array Array, Color Array Array> | — |
Remarks
Converts the current heightmap into a grayscale image, lets caller-provided code modify that image, then writes the modified grayscale values back into the heightmap as heights.
Per IPixelImageSampler.UpdateColorData.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Create Derived Map
FunctionThis node carries no documentation.
CreateDerivedMap -> Scalar Field
source: Scalar Field
usage: TextScalarField2D CreateDerivedMap(
ScalarField2D source,
string usage)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| usage | Text | — |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
From Arrays
FunctionThis node carries no documentation.
FromArrays -> Scalar Field
initialData: Low Accuracy Number Array Array
usage: Text
physicalScale: NumberScalarField2D FromArrays(
float[][] initialData,
string usage = "Height",
double physicalScale = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| initialData | Low Accuracy Number Array Array | — | |
| usage | Text | Height | |
| physicalScale | Number | 1 |
Returns
| result | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Generate Biome Texture
FunctionThis node carries no documentation.
GenerateBiomeTexture(heightmap: Scalar Field) -> Pixel Image
PixelImage GenerateBiomeTexture(ScalarField2D heightmap)
Parameters
| name | type | default | description |
|---|---|---|---|
| heightmap | Scalar Field | — |
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Generate Biome Texture Gradient
FunctionThis node carries no documentation.
GenerateBiomeTextureGradient(heightmap: Scalar Field) -> Pixel Image
PixelImage GenerateBiomeTextureGradient(ScalarField2D heightmap)
Parameters
| name | type | default | description |
|---|---|---|---|
| heightmap | Scalar Field | — |
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Get Slope Map Usage Token
FunctionReturns the canonical usage/term string for a slope map type.
GetSlopeMapUsageToken(slopeMapType: Slope Map Type) -> Text
string GetSlopeMapUsageToken(ScalarField2D.SlopeMapType slopeMapType)
Parameters
| name | type | default | description |
|---|---|---|---|
| slopeMapType | Slope Map Type | — |
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
To Grayscale Pixel Image
FunctionThis node carries no documentation.
ToGrayscalePixelImage(heightmap: Scalar Field) -> Pixel Image
PixelImage ToGrayscalePixelImage(ScalarField2D heightmap)
Parameters
| name | type | default | description |
|---|---|---|---|
| heightmap | Scalar Field | — |
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation
Validate Physical Scale
FunctionThis node carries no documentation.
ValidatePhysicalScale
source: Scalar Field
usePhysicalScale: Truthvoid ValidatePhysicalScale(
ScalarField2D source,
bool usePhysicalScale)Parameters
| name | type | default | description |
|---|---|---|---|
| source | Scalar Field | — | |
| usePhysicalScale | Truth | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Scalar Field
- Package
- Procedural Generation