Skip to content
Orbdale

Orbdale Terrain · OrbdaleTerrain 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

EOrbdaleTerrainBrushBake FromPlane(const uint16* Plane, int32 Width, int32 Height, const FBakeSpec& Spec,
                                                         std::shared_ptr<const OrbdaleTerrain::Native::FBrushMask>& OutMask);
Header
#include "OrbdaleTerrainBrushAsset.h"
Module
PublicDependencyModuleNames.Add("OrbdaleTerrain"); 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 OrbdaleTerrain::Native::FBrushMask>&—

The mask on Ok.

Returns

Ok, BadSize or Refused.

Note.

Any thread.