struct
WaterBodyComponent
- Module
- SceneTypes
- Header
#include "SceneTypes/Components/WaterBodyComponent.h"- Namespace
Mowo- Reflection
- Reflected by MowoHeaderTool
Properties
| Type | Name | Description |
|---|---|---|
bool | enabled | Default true. |
EWaterBodyType | type | Default EWaterBodyType::Lake. |
std::vector<FWaterSplinePoint> | splinePoints | |
float | oceanSize | Default 512.0f. |
int32_t | meshResolution | Default 96. |
bool | oceanQuadTree | Ocean LOD. A fixed grid spends the same triangle on the horizon as on the wave breaking at the camera, which is why the pre-quadtree ocean was capped at a few hundred metres before the vertex count stopped being affordable. Rivers and lakes keep their spline meshes — a ribbon and a closed polygon are not grids. Default true. |
float | oceanLodExtent | Side of the camera-following rendered patch, in metres. 0 = auto: the whole body up to 1 km, past which the patch follows the viewer inside the body's own extent. Never larger than Ocean Size — the query box is the body, and a patch drawn outside it would be water nothing floats on. Default 0.0f. |
int32_t | oceanLodLevels | Default 4. |
float | oceanLodScale | Default 2.0f. |
int32_t | oceanLodQuads | Default 8. |
int32_t | riverSegmentsPerSpan | Default 8. |
float | waveAmplitude | Default 0.25f. |
float | waveLength | Default 16.0f. |
float | waveSteepness | Default 0.45f. |
float | waveSpeed | Default 3.0f. |
float | waveDirectionDegrees | Default 0.0f. |
std::string | waveSpectrumPath | Wave spectrum asset (.mwaves). When set it overrides the five inline spectrum fields below; when empty they are authoritative. |
int32_t | spectrumWaveCount | 0 = the legacy four-band curve every pre-spectrum scene was authored against. Any positive count switches to the generator, on both the CPU query and the vertex shader. Default 0. |
float | spectrumWavelengthFalloff | Default 0.62f. |
float | spectrumAmplitudeFalloff | Default 0.56f. |
float | spectrumAngularSpreadDegrees | Default 36.0f. |
int32_t | spectrumSeed | Default 1. |
int32_t | spectrumMode | 0 = the geometric band falloff, 1 = Phillips, 2 = JONSWAP. The two spectral modes take their band amplitudes from an energy density at each band's wavenumber and stop reading Amplitude Falloff; Wind Speed drives them instead. Default 0. |
float | spectrumWindSpeed | Default 9.0f. |
int32_t | spectrumCascadeCount | Patch sizes the bands are spread over, each a quarter of the one before. One cascade is a single band of scales; three reach from the swell down to the chop without spending sixteen bands inside one octave. Default 2. |
float | flowSpeed | Default 2.5f. |
int32_t | flowMapResolution | Painted flow map. A river gets its current from the spline tangent, but a lake has no centreline to take one from, so its current is painted: a square RG raster over the body's own XZ box, 128 meaning "no deflection on this axis". Zero resolution = nothing painted, and the body flows exactly as it did before the tool existed. Default 0. |
float | flowMapStrength | Default 1.5f. |
std::string | flowMapData | The raster itself, hex-encoded RG8. It is a string rather than a texture asset because it is authored per body and has no life outside the scene that owns it — a sidecar asset would need a UUID, a browser entry and a delete-safety edge for something a designer thinks of as part of the lake. Hidden from Details: a few thousand hex characters is not an editable row. |
float | oceanDepth | Water column depth for a body with no per-point depth to read — the ocean plane. Answers the depth query and nothing else. Default 20.0f. |
int32_t | priority | Which body wins where two overlap. A river crossing a lake reads as a river when its priority is higher; equal priorities blend across the shoreline band instead of one cutting the other off. Default 0. |
float | transitionWidth | Metres of this body's own shoreline over which it hands the surface over to whatever it overlaps. Zero is the pre-transition behaviour — the higher priority simply wins at its own edge, which is a step in the height and a pop in buoyancy where a river meets a lake. Default 3.0f. |
Vec3 | color | Default Vec3(0.04f, 0.16f, 0.22f). |
float | opacity | Default 0.72f. |
float | depthFade | Default 1.5f. |
float | absorptionDensity | Default 0.35f. |
float | refractionStrength | Default 0.5f. |
bool | foamEnabled | Default true. |
float | shoreFoamWidth | Default 1.0f. |
float | carveBankWidth | Metres beyond the water's edge over which the terrain carve ramps back to the untouched heightfield. Too narrow and the river sits in a slot with vertical walls; too wide and it flattens the valley it runs through. Default 6.0f. |
std::string | flowMapBinary | The flow map decoded once into raw bytes. Held as a string because that is what the reflection tables can carry; every query samples this and never the hex, or a boat's four buoyancy probes would decode a hundred kilobytes of text per frame. |
std::string | flowMapDecodedFrom | The hex the cache above was decoded from. A length check alone would not notice an UNDO: the editor's component snapshots restore flow_map_data and skip runtime-only fields, so a reverted stroke leaves a map of the same size with different bytes, and the queries would keep pushing boats along a current the designer just took back. |
std::string | builtFingerprint | |
float | waveTime | Default 0.0f. |
Constructors
| Signature | Name | Description |
|---|---|---|
WaterBodyComponent() = default | WaterBodyComponent |
Function details
WaterBodyComponent
C++
WaterBodyComponent() = defaultGenerated from SceneTypes/Components/WaterBodyComponent.h via scenetypes.json · Nov 4, 2026Version 1.0.0