Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrainRenderer module · struct

FTerrainGrassRenderSettings

Experimental

What a grass component needs from one FGrassVariety, resolved for the current quality level.

Declaration

struct FTerrainGrassRenderSettings
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

Holds strong engine pointers in a plain struct (no UPROPERTY): the owner must report them to the GC, see AddGrassVarietyReferences. Distances are cm; 0 disables a cull distance, as in FGrassVariety.

Note.

Game thread.

Properties

NameTypeDefaultMeaning
MeshTObjectPtr<UStaticMesh>—

The variety's mesh; never null in a built entry.

OverrideMaterialsTArray<TObjectPtr<UMaterialInterface>>—

Per-slot overrides; entries may be null.

StartCullDistanceint320

FGrassVariety::GetStartCullDistance(), cm.

EndCullDistanceint320

FGrassVariety::GetEndCullDistance(), cm; 0: never culled (built on every resident chunk).

MinLODint32-1

-1: the mesh's own MinLOD.

LightingChannelsFLightingChannels——
bReceivesDecalsbooltrue—
bCastDynamicShadowbooltrue—
bCastContactShadowbooltrue—
bAffectDistanceFieldLightingboolfalse

The variety's flag, and only with uniform scaling: mesh distance fields do not support non-uniform instance scale.

ShadowCacheInvalidationBehaviorEShadowCacheInvalidationBehaviorEShadowCacheInvalidationBehavior::Auto—
InstanceWorldPositionOffsetDisableDistanceuint320

cm; 0: never.

bKeepInstanceBufferCPUCopyboolfalse—
bEnableDensityScalingbooltrue

The grass type's flag: grass.densityScale and r.OrreryTerrain.Grass.DensityScale apply.

MeshBoxFBoxFBox(ForceInit)

The cluster tree's instance box, local cm: the mesh's bounds (UStaticMesh::GetBounds, its bounds extensions included) grown by the largest GetMaxWorldPositionOffsetDisplacement() of the materials it draws with, so culling covers the WPO reach.

A WPO material that sets no maximum displacement is not covered: give it one, or a bounds extension.

MaxInstancesPerLeafint3216

Instances per cluster-tree leaf, from the mesh's LOD 0 vertex count (foliage.MinVertsToSplitNode / verts, 1..1024).