Orrery Terrain · OrreryTerrainRenderer module · function
BuildGrassVarieties
ExperimentalBuild the varieties of a layer set from its loaded grass types.
Declaration
void BuildGrassVarieties(const UOrreryTerrainLayerSet& Set, TArray<FTerrainGrassVarietyEntry>& 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 (reads UObjects).
Description
Honours, per variety: density (GetDensity(), the quality's, × kGrassDensityToPer100m2) times the entry's DensityScale, grid or Halton, jitter, AllowedDensityRange, scaling, rotation and alignment (Halton always aligns to triangle normals, as the type's own doc says; the grid follows bAlignToTriangleNormals), the render fields of FTerrainGrassRenderSettings; per entry: slope, altitude, class mask, margin (m to cm), bOnPlates. Types not loaded, entries with a null type or DensityScale <= 0, varieties without a mesh and varieties whose density at the current quality is 0 are skipped (not IsGrassQualityLevelEnable: it returns false in the -nullrhi automation runner even for a default variety). bUseLandscapeLightmap is ignored: the terrain has no lightmap.
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
Set | const UOrrery | — | The layer set; layers beyond NumLayers() are ignored. |
Out | TArray< | — | Replaced (emptied first) with the entries in order layer, entry, variety. |
Game thread (reads UObjects). Does not load anything: see FTerrainGrassLoader.