Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrainCore module · struct

Native::

FScatterLayerRules

Experimental

The auto rules of a terrain's material: the one source of where layers show.

Declaration

struct FScatterLayerRules
Header
#include "Native/TerrainScatter.h"
Module
PublicDependencyModuleNames.Add("OrreryTerrainCore"); in your module’s Build.cs.
Stability
Experimental: supported, may change in a minor version, with a changelog line.
Thread
Tier 1: plain C++, no allocation, deterministic in canonical order (ascending candidate index), any thread. (the header’s rule)

Description

The material and this kernel evaluate the same formula (EffectiveLayerWeights); Orrery.Terrain.Scatter.Weights.EffectiveParity holds them together. NumRules = 0: layer 0 keeps all of the unpainted weight.

Properties

NameTypeDefaultMeaning
NoiseScaleMfloat{38.f, 110.f}

AutoNoise.xy: the lattice cell of noise fields 0 and 1, metres.

AltitudeOffsetMfloat0.f

AutoNoise.z, metres, added to world Z before the altitude bands.

NoiseOriginXCmdouble0.0

World XY where the material's terrain-space position P is (0,0), cm.

P = TexCoord 0 × the post size, and the near vertex factory's TexCoord 0 is the post position from post (0,0) of tile (0,0) (local post + tile × 127), so this is the terrain grid's origin: the shell fills it with FTerrainConfig::Grid.Origin × 100, which equals FTerrainChunkPosts::Origin − Tile × kTileQuads × Cell for every chunk. Assumes an unrotated terrain, as the posts do.

NoiseOriginYCmdouble0.0—
RockMaskfloat0.f

MF_TerrainLayers' RockMask input, 0..1: a share of W0 drawn as layer 2.

NumRulesint32_t0

Rules in use, at most kScatterMaxAutoRules; later rules lie on top.

RulesFScatterAutoRule——