struct
FoliageComponent
- Module
- Game
- Header
#include "Game/Components/FoliageComponent.h"- Namespace
Mowo- Reflection
- Reflected by MowoHeaderTool
Properties
| Type | Name | Description |
|---|---|---|
bool | enabled | Default true. |
float | density | Default 0.25f. |
int32_t | seed | Default 1337. |
int32_t | bladesPerClump | Default 3. |
float | bladeWidth | Default 0.1f. |
float | bladeHeight | Default 0.7f. |
float | minScale | Default 0.7f. |
float | maxScale | Default 1.3f. |
float | slopeLimit | Default 0.35f. |
float | minHeight | Default -10000.0f. |
float | maxHeight | Default 10000.0f. |
Vec3 | baseColor | Default Vec3(0.10f, 0.22f, 0.05f). |
Vec3 | tipColor | Default Vec3(0.35f, 0.62f, 0.16f). |
float | windStrength | Default 0.12f. |
float | windSpeed | Default 1.6f. |
float | windDirectionDegrees | Default 0.0f. |
int32_t | cellsPerSide | Default 8. |
int32_t | maxInstances | Default 100000. |
int32_t | layerIndex | 0-3 read the first weightmap plane, 4-7 the second. The range used to stop at 3 because only one plane was ever sampled, which silently made half the palette ungrassable. Default -1. |
float | layerWeightThreshold | Default 0.25f. |
float | alignToSlope | 0 = every clump stands straight up, 1 = every clump lies in the surface plane. Vertical grass on a hillside reads as cardboard standing on edge; fully aligned grass on a cliff hangs out of it. The blend is what an artist actually tunes. Default 0.0f. |
float | treeDensity | Default 0.004f. |
std::string | treeModelPath | |
float | treeMinScale | Default 0.8f. |
float | treeMaxScale | Default 1.4f. |
float | treeSlopeLimit | Default 0.25f. |
float | treeMinHeight | Default -10000.0f. |
float | treeMaxHeight | Default 10000.0f. |
int32_t | treeMaxInstances | Default 2000. |
std::string | builtFingerprint | |
std::vector<FoliageBatchDraw> | renderBatches | GPU-instanced render batches — built by FoliageSystem when r.Foliage.GPU != 0 (grass clump instances + tree impostor cards), submitted per frame by Scene::OnRender. Never serialized; a scene load rebuilds them through the fingerprint. |
Constructors
| Signature | Name | Description |
|---|---|---|
FoliageComponent() = default | FoliageComponent |
Function details
FoliageComponent
C++
FoliageComponent() = defaultGenerated from Game/Components/FoliageComponent.h via game.json · Nov 5, 2026Version 1.0.0