Water bodies, waves, and buoyancy
Dawn Engine Water authors streams, rivers, lakes, and oceans as first-class water bodies: a unified surface query (height / depth / flow), Atom refraction and reflection, Gerstner or FFT waves, buoyancy physics, and optional bridges to SurfaceData, Navigation3D, and particles.
Maturity: shipped. Provided by the Water Gem; depends on LmbrCentral, Atom / Atom_RPI, and SurfaceData. Enabled by default (/O3DE/Gems/Water/Enabled=true). After enablement, the system component mounts automatically; you still place river / lake / ocean components on scene entities.
It does not provide CFD flooding or automatic river–lake–ocean fusion: levels and estuary blends are authored (mouth fade + optional blend band). Tide is a global / per-body height offset, not a hydrodynamic sim.
What problem it solves
Open-world and digital-twin levels need more than a flat reflective plane: flowing rivers with variable width, lakes with islands, camera-centered oceans, floating objects, swimming / underwater fog, and gameplay that can ask “what is the water height here?”. Water provides:
- Spline rivers (Stream / River / GreatRiver presets), closed-spline or polygon lakes, and infinite or finite oceans;
- Deterministic surface mesh generation and a shared water clock so CPU queries match GPU displacement (≤ 1 cm @ 100 km);
.waterwavesspectrum assets (explicit Gerstner or Phillips / JONSWAP → FFT);- Stage rendering: refraction, planar reflection / SSR / IBL, shore foam, caustics, underwater fog / DoF, motion vectors;
WaterBuoyancyComponentplus enter / exit / submersion events for physics and gameplay.
With the Gem disabled, levels have no water bodies, queries, or water pass draws.
How it works
Editor authoring (spline / sea level / waves / bake)
│
WaterBody*Component ──► BuildSurface() ──► WaterBodyRegistry (CPU queries / physics)
│
└──────────────► BuildRenderData() ──► WaterFeatureProcessor (Atom)
│
TransparentPass ← WaterParent (refract / surface / FFT / caustics)
│
Gameplay / buoyancy / script ──► WaterSurfaceRequestBus (Vector3d world sample)
Two rules run through the Gem:
- Core vs framework: wave math, river sampling, and mesh generation depend only on AzCore and stay headless-testable; components and bridges orchestrate.
- One query surface: physics, camera underwater checks, SurfaceData tags, and scripts all go through
WaterSurfaceRequestBusagainst the same registry arbitration (river family > lake > ocean by default priority).
Layout under Gems/Water/:
| Path | Role |
|---|---|
Code/ | Runtime + editor components, Atom / SurfaceData / Navigation / Particle bridges |
Assets/ | Prefabs, .waterwaves, materials, shaders, pass templates |
Registry/ | Default Settings Registry (water.setreg) |
Open-world projects typically combine Water with double-precision rendering, World Streaming, and optionally PolyTerrain for river-bed carve.
Quick start (summary)
- Enable
Water(Project Manager orproject.json). Confirm/O3DE/Gems/Water/Enabled=trueand that the Atom pipeline includesTransparentPass(orMultiViewTransparentPass). - Create Entity → Water → Lake (or River / Ocean), or spawn a prefab from
Gems/Water/Assets/Prefabs/Water/. - Assign waves and a material; for floating debris add Rigid Body + Collider +
WaterBuoyancyComponent. - Query via
WaterSurfaceRequestBus(C++ / Lua / Script Canvas categorywater).
For the full walkthrough and verification checklist, see Getting started.
Handbook chapters
| Chapter | Contents |
|---|---|
| Getting started | Enable the Gem, place a body, run one surface query, verify with WaterSamples |
| Core concepts | Body family, registry arbitration, water clock, CPU/GPU consistency, large-world rules |
| Authoring | River / Lake / Ocean fields, baking, Dry Volume, River Network |
| Waves and materials | .waterwaves, FFT / ripples, material presets, quality tiers |
| Buoyancy and gameplay | Buoyancy, surface attachment, events, bridges, tide, scripting |
| Debugging | Overlay, viewport helpers, Settings Registry, troubleshooting |
| Recipes | Stream→lake, calm lake, open ocean, estuary, river network |
| Reference | Components, EBuses, assets, sample levels |
Glossary
| Term | Meaning |
|---|---|
| Water body | One editable / queryable water instance (WaterBody*Component) |
| Water surface | Upper surface sampled by WaterSurfaceRequestBus |
| Flow map | Baked 2D direction + speed map for dual-phase normal scroll |
| Gerstner wave | Explicit multi-component gravity-wave sum (CPU/GPU same formula) |
| FFT ocean | Phillips / JONSWAP spectrum → GPU IFFT displacement; CPU uses ≤16-component approx |
| Shore distance | Signed distance to shoreline; drives foam and amplitude fade |
| Water depth | Surface height minus bed / terrain; drives absorption and buoyancy |
| Blend band | Soft cross-body blend near a body’s XY boundary (0 = winner-takes-all) |
| Mouth fade | Estuary arc-length fade that zeros river waves and damps ocean waves near the mouth |
| waterTime | Shared clock (wraps every 3600 s) driving CPU queries and GPU waves |
Limits and related capabilities
You can rely on:
- Stream / River / GreatRiver, Lake, Ocean authoring with live editor preview;
- Unified
WaterSurfaceRequestBusqueries matching GPU displacement; - Gerstner + Spectrum/FFT waves, shore / flow bake, buoyancy and script events;
- Quality tiers, World Streaming AlwaysLoaded ocean, optional Navigation3D / particle / SurfaceData bridges.
Do not assume:
- Automatic CFD flooding or auto-merged river–lake–ocean topology;
- Runtime PolyTerrain height queries without an editor shore / depth bake;
- More than one unbounded ocean, or more than one Spectrum ocean driving FFT (extras fall back to CPU approx);
- Mobile-tuned paths (use Low tier as the baseline).
Next steps
- Getting started — shortest path to visible water and a working query.
- PolyTerrain — river-bed carve and mesh-terrain coexistence.
- World Streaming / Double-precision rendering — large-world oceans and origin-stable waves.
- Navigation3D — underwater hybrid routing against Water body regions.
Getting started
Enable the Water Gem, place a lake or river, run a surface query, and verify with WaterSamples.
Core concepts
Water body family, registry arbitration, shared water clock, CPU/GPU consistency, and large-world rules.
Authoring
Author rivers, lakes, and oceans; bake flow and shore data; configure Dry Volume and River Network.
Waves and materials
Configure .waterwaves assets, FFT oceans and ripples, material presets, and quality-tier rendering features.
Buoyancy and gameplay
Configure buoyancy and surface attachment, listen for water events, use bridges and tide, and call script / C++ surface APIs.
Debugging
Use the Water Diagnostics overlay, viewport helpers, Settings Registry, and troubleshooting tables.
Recipes
Followable setups for stream-to-lake, calm lake, open ocean, estuary, and river network.
Reference
Component list, EBuses, assets, sample levels.