Heightmap.Combine

Description

Name

class Tinman.Heightmap.Combine

Derived from

Heightmap

Adds detail to the first heightmap by combining it with the given second heightmap.

The heightmap samples of the first heightmap are modified using the samples of the given second heightmap according to these rules:

  • Heightmap.Layer.Coverage:
    The coverage of the first heightmap will remain unchanged. The coverage of the second heightmap will be ignored.

  • Heightmap.Layer.Elevation:
    The terrain-space elevation values (see Vertical.Range) of the first heightmap and the second heightmap are added; then the elevation sum is converted back to elevation values using the combined vertical range.

  • Heightmap.Layer.Texture:
    The given color operation (see textureOp) is applied to the texture color of the first heightmap and the color of the second heightmap.

  • Heightmap.Layer.Material:
    The material tokens of the first heightmap are mixed with the tokens of the second heightmap: If the weight sum of the second token is greater than or equal to 255, the first token will be replaced with the second token. Otherwise, the first token will be gradually blend into the detail token (see Mix).

  • Heightmap.Layer.Displacement:
    The terrain-space displacement values (see Vertical.Range) of the first heightmap and the second heightmap are added; then the displacement sum is converted back to displacement values using the combined vertical range.

Fields / Required

first

Type

Heightmap

Constraint

# != null

The original heightmap.


second

Type

Heightmap

Constraint

# != null

The detail heightmap.

Fields / Optional

textureOp

Type

ColorOp

Default

ColorOp.Blend

The color operation to apply to the Heightmap.Layer.Texture layer, if present.


scalarOp

Type

ScalarOp

Default

ScalarOp.Add

The scalar operation to apply to the Heightmap.Layer.Elevation and Heightmap.Layer.Displacement layers, if present.

Fields / External

id

Type

Dataset.Id

Returns a unique identifier for this dataset.


metadata

Returns dataset metadata information.


georef

Returns georeferencing information.


info

Holds detail information about this heightmap.