struct
TerrainComponent
- Module
- Game
- Header
#include "Game/Components/TerrainComponent.h"- Namespace
Mowo- Reflection
- Reflected by MowoHeaderTool
Properties
| Type | Name | Description |
|---|---|---|
bool | enabled | Default true. |
std::string | heightmapPath | |
float | worldSize | Default 256.0f. |
float | heightScale | Default 32.0f. |
int32_t | chunksPerSide | Default 4. |
int32_t | chunkResolution | Default 32. |
bool | generateCollision | Default true. |
std::string | layer0Path | |
std::string | layer1Path | |
std::string | layer2Path | |
std::string | layer3Path | |
std::string | layer4Path | |
std::string | layer5Path | |
std::string | layer6Path | |
std::string | layer7Path | |
std::string | weightmapPath | |
std::string | weightmap2Path | |
std::string | editLayersPath | The non-destructive sculpt stack, stored beside the terrain exactly like the weightmaps are: the heightmap file holds the FLATTENED result, this holds base + per-layer deltas, and a load recomposites from it so hiding a layer still restores what was underneath. Empty = the terrain was saved flattened and sculpting writes straight into the base. |
std::string | retopoPath | The retopologize XZ offset grid, stored the same way and for the same reason as the edit-layer blob: it describes where the render samples sit, which the flattened heightmap beside it cannot express. |
ESurfaceType | layer0Surface | A terrain is not one material. Each painted layer carries its own surface, and the collider resolves per square from the dominant weight, so walking off grass onto the rock you painted changes the footstep. Default ESurfaceType::Grass. |
ESurfaceType | layer1Surface | Default ESurfaceType::Stone. |
ESurfaceType | layer2Surface | Default ESurfaceType::Snow. |
ESurfaceType | layer3Surface | Default ESurfaceType::Sand. |
ESurfaceType | layer4Surface | Default ESurfaceType::Dirt. |
ESurfaceType | layer5Surface | Default ESurfaceType::Mud. |
ESurfaceType | layer6Surface | Default ESurfaceType::Gravel. |
ESurfaceType | layer7Surface | Default ESurfaceType::Wood. |
float | layerTiling | Default 32.0f. |
float | layerBlendSharpness | Default 0.0f. |
bool | enableHoles | Default false. |
float | slopeThreshold | Default 0.45f. |
float | highHeight | Default 24.0f. |
float | lowHeight | Default 4.0f. |
std::vector<FTerrainSplinePoint> | splinePoints | Splines are deliberately absent from the rebuild fingerprint: applying one is an explicit command that writes into the edit session, so a fingerprint rebuild triggered by moving a point would discard the sculpt the previous apply produced. |
int32_t | splineLayer | Default -1. |
float | splineStrength | Default 1.0f. |
int32_t | splineSegmentsPerSpan | Default 8. |
bool | splineRaise | Default true. |
bool | splineLower | Default true. |
std::vector<FTerrainGrassType> | grassTypes | Grass authored on the layer palette. Empty is the historical behaviour: scatter comes from a sibling FoliageComponent, or from nothing. |
bool | streamingTile | One tile of a tiled import. A tile streams: TerrainSystem builds its mesh, quadtree and collider when the camera comes within the streaming load radius and releases them past the unload radius. Off for a stand-alone landscape, which is always resident. Default false. |
bool | streamingAlwaysLoaded | Never evicted regardless of distance — the tile holding the player start, or one a scripted sequence needs standing. Default false. |
std::string | builtFingerprint | |
uint32_t | weightmapRevision | Bumped by every weightmap write. Layer-gated foliage scatters from those weights, so painting grass onto a slope has to re-scatter it — and the only other signal available was the terrain's own build fingerprint, which would rebuild every chunk and the collider for one brush dab. Default 0. |
Constructors
| Signature | Name | Description |
|---|---|---|
TerrainComponent() = default | TerrainComponent |
Function details
TerrainComponent
C++
TerrainComponent() = defaultGenerated from Game/Components/TerrainComponent.h via game.json · Nov 5, 2026Version 1.0.0