Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrain module · function

BrushBake::

FromPlane

Bake one 16-bit plane: resample to the spec's side, invert, quantise to its depth and make the mask.

Declaration

EOrreryTerrainBrushBake FromPlane(const uint16* Plane, int32 Width, int32 Height, const FBakeSpec& Spec,
                                                         std::shared_ptr<const OrreryTerrain::Native::FBrushMask>& OutMask);
Header
#include "OrreryTerrainBrushAsset.h"
Module
PublicDependencyModuleNames.Add("OrreryTerrain"); in your module’s Build.cs.
Stability
Stable: changes within a major version only add.
Thread
Any thread.

Description

The resample is integer only (a box filter down, bilinear up, each pass rounded once), so the same plane and spec give the same bytes and the same hash on every machine. The hash covers the baked bytes only; the source is never part of it.

Parameters

NameTypeDefaultMeaning
Planeconst uint16*—

Width x Height unorm samples, row-major, 0 to 65535.

Widthint32—

Samples a row of Plane.

Heightint32—

Rows of Plane.

Specconst FBakeSpec&—

The bake settings; the channel is ignored.

OutMaskstd::shared_ptr<const OrreryTerrain::Native::FBrushMask>&—

The mask on Ok.

Returns

Ok, BadSize or Refused.

Note.

Any thread.