Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrainEditor module · class

UOrreryTerrainLandscapeImport

Editor only

Imports a Landscape into a tile store (editor only): the final heightmap exactly, and optionally the paint layers.

Declaration

UCLASS()
class UOrreryTerrainLandscapeImport : public UBlueprintFunctionLibrary
Header
#include "OrreryTerrainLandscapeImport.h"
Module
PublicDependencyModuleNames.Add("OrreryTerrainEditor"); in an editor module’s Build.cs: an editor module, not in packaged games.
Stability
Stable: changes within a major version only add.
Derives from
UBlueprintFunctionLibrary
Blueprint
“Orrery Terrain Landscape Import”, a Blueprint type

Description

Reads through Landscape's edit data interface on the final layer (an FGuid() edit layer, without dirtying any package), never through the GPU. The store's grid is the Landscape's vertex lattice: BaseCell_m is the Landscape's X scale over 100, Origin_m the world XY of its first vertex, and the store's tile (0, 0) starts there. Our posts are the host's vertices, and both split quads on the same diagonal.

Heights: world Z cm = Z + (h - 32768) / 128 * Scale.Z of the Landscape's transform, given to the store as StorePostMm, so a stored post is within 5 mm of the exact decode on tiles of shift 0 (relief up to about 327 m a tile) and within 5 * 2^s mm plus 1 mm on tiles of shift s (QuantiseBaseTile rounds once, to half a step). Paint: each paint layer's final weights, merged to the kPaintSlots strongest a post by MergeLayerWeights. The visibility layer (holes) is counted and dropped: our holes come from features' openings only.

Integer decode and a fixed order throughout: the same Landscape and options give the same store hash.

Types

  • EStoreState enum

    How a tile store stands against the Landscape it was imported from.

    NotFromLandscape, Current, Stale, Unavailable

Functions

  • ImportLandscapeToStorestatic

    Import a Landscape's final heightmap, and its paint when Options.bImportPaint, into a tile store.

  • ComputeHostHashstatic

    Hash of what an import reads from a Landscape, without reading it: the placement (transform and extent) and, in component order, the source id of every final heightmap and weightmap texture and every weightmap layer allocation.

  • IsImportCurrentstatic

    Whether a store imported from a Landscape still matches it: its provenance names a Landscape import, and ComputeHostHash of the Landscape equals the hash recorded at import.

  • CheckStoreAgainstSourcestatic

    Resolve the Landscape a store was imported from, by the path in its provenance, without loading anything, and run IsImportCurrent on it.

  • CheckImportCurrentBlueprintstatic

    Python and Blueprint entry: IsImportCurrent as a struct, so a stale store still gives Python its reason.

  • ImportLandscapeBlueprintstatic

    Python and Blueprint entry: ImportLandscapeToStore with the default options, the given paint switch and the hide switch.

Blueprint