Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrain module · function

BrushBake::

FromTiff

Bake a 16-bit (or 8-bit or floating point) single-band TIFF.

Declaration

EOrreryTerrainBrushBake FromTiff(const uint8* Data, int64 Size, const FBakeSpec& Spec,
                                                        std::shared_ptr<const OrreryTerrain::Native::FBrushMask>& OutMask, FString* Why = nullptr);
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 samples are read as the DEM importer reads heights, then normalised to the file's own range: its lowest valid sample becomes black and its highest white, so a DEM snippet becomes a mountain whose Stamp Strength is its peak. A file with no valid sample, or a flat one, bakes to black. Samples without data are black.

Parameters

NameTypeDefaultMeaning
Dataconst uint8*—

The whole file.

Sizeint64—

Bytes in the file.

Specconst FBakeSpec&—

The bake settings; the channel is ignored.

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

The mask on Ok.

WhyFString*nullptr

Optional; on BadTiff the reader's message.

Returns

Ok, BadTiff, BadSize or Refused.

Note.

Any thread.