Orrery Terrain · OrreryTerrainRenderer module · function
ReadScatterRulesFromMaterial
ExperimentalRead the terrain material's auto rules (the MF_TerrainLayers parameters) into the kernel's rules.
Declaration
bool ReadScatterRulesFromMaterial(const UMaterialInterface* Material, OrreryTerrain::Native::FScatterLayerRules& Out);- Header
#include "Grass/TerrainGrassVarieties.h"- Module
PublicDependencyModuleNames.Add("OrreryTerrainRenderer");in your module’s Build.cs.- Stability
- Experimental: supported, may change in a minor version, with a changelog line.
- Thread
- Game thread.
Description
Reads the vector parameters AutoNoise and AutoRule{i}_Slope, _Altitude, _Noise (i = 0..4) and the scalar RockMask. A rule the material lacks gets coverage 0. Trailing rules the material leaves unused (coverage 0) are dropped, so NumRules counts through the last rule with coverage above 0. NoiseOriginXCm and NoiseOriginYCm keep the values Out had: the grass system fills them in per chunk.
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
Material | const UMaterial | — | Any material interface that carries the parameters (the terrain wrapper instance). |
Out | Orrery | — | Replaced with the rules; reset to defaults (NumRules 0) when the function returns false. |
Returns
False when Material is null or has no AutoNoise parameter (not a terrain material).
Game thread.