World Partition and streaming
DRW works in World Partition maps without extra setup. This page explains what streams, what stays loaded, what you see from far away, and the few cases where you should plan your cells around the water.
The shipped LakeMap (/DynamicRealWater/Maps/) is a World Partition map: a streamed landscape, a lake and a boat, with its HLOD layer LakeMap_HLOD0_Instancing.
The ocean
Section titled “The ocean”The ocean’s Grid Manager (the BP_DynamicRealWater actor) is not spatially loaded: it stays loaded wherever the player is, so the sea is always there.
The ocean bakes its shoreline and depth from the land around it. Under World Partition:
- Landscapes are found automatically, including the streaming proxies World Partition splits a landscape into.
- HLODs of unloaded cells are part of the bake: with GPU Depth Capture on (the default), the bake includes the HLODs that stand in for unloaded cells, so distant coasts keep their depth and surf while their cells are not loaded.
- Streaming triggers a rebake: when a cell that contains land (landscape, Shoreline Obstacle or HLOD) inside the bake area loads or unloads, the ocean rebakes its shoreline shortly after streaming settles. For streamed landscapes it also updates where the ocean is removed under land.
- Shoreline Obstacles that stream in or out trigger the same rebake.
Client Depth Map Delay (Grid Manager, DRW Grid Settings, advanced; default 0.2 s, range 0 to 10) delays the first land detection and depth bake when play starts, on every instance except a dedicated server, to let landscape streaming complete first. Raise it if the first bake after loading a level misses land that streams in late. 0 starts immediately.
Lakes, pools and rivers
Section titled “Lakes, pools and rivers”Water bodies are ordinary spatially loaded actors: a lake, pool or river loads and unloads with its cell, like a static mesh would. While loaded, it works exactly as in a normal level.
HLODs for water
Section titled “HLODs for water”Every water body (lake, pool and river) carries an editor-only HLOD component, so its surface appears in World Partition HLODs without any setup. When you build HLODs:
- DRW bakes the water’s surface mesh as it is in the editor (for a river, its surface including the bank overhang), simplified for the distance the HLOD is seen from.
- The HLOD casts no shadow and has no collision.
- It uses the body’s HLOD Material (category DRW WaterBody > World Partition), or the body’s own water material when that is empty.
- Moving, resizing or reshaping the water, or changing its HLOD Material, marks its HLOD out of date, so the next HLOD build updates it.
- The component costs nothing in a packaged game.
As for any World Partition actor, the water needs an HLOD layer (its own, or the world’s Default HLOD Layer) to get an HLOD.
What you have when a cell unloads
Section titled “What you have when a cell unloads”| Cell loaded | Cell unloaded | |
|---|---|---|
| Ocean | Full ocean | Full ocean (always loaded) |
| Lake, pool, river surface | Full water | Its HLOD surface, if HLODs are built |
| Floating objects, water queries, underwater view | Work | Nothing: the HLOD is only a mesh. There is no water body to float on or query. |
| River Rock Markers | Shape the river | Unloaded with their cell |
Connected water across cells
Section titled “Connected water across cells”Rivers connect to the lakes, pools and rivers they touch when they are built: in the editor, and again when the river begins play.
- River to river (junctions): connections repair themselves. When a tributary loads, it tells the main river to rebuild; when a main river loads, it finds the tributaries that are already loaded.
- River to lake or pool (a river flowing into or out of one): the river finds the lake when the river is built. If the lake loads after the river, the river does not see it. Keep a river and its lake in the same cell or the same always-loaded area, or call Rebuild Hydraulics on the river after the lake has loaded.
- River Rock Markers update every river when they load or unload, so a marker in another cell still shapes the river once both are loaded.
Floating objects in streamed cells
Section titled “Floating objects in streamed cells”- A lake, pool or river that loads picks up the floating objects already inside it when it begins play.
- When a water body unloads while an object it holds stays loaded (for example the player’s boat), the object loses that water. It floats on the ocean if the level has one; otherwise it has no water under it. Keep the water under the player loaded, for example with a large enough loading range, or turn off Is Spatially Loaded on that water body.
- The underwater view follows streaming too: DRW adds its underwater component to each local player’s pawn once an ocean or a water body with Enable Underwater is loaded. A lake that has just streamed in can take a couple of seconds to show its underwater look.
Editing in World Partition maps
Section titled “Editing in World Partition maps”Apply Trace, Align To Terrain, Carve Landscape and bed obstacle detection read the landscape loaded in the editor. Load the cells under a river before you trace, align or carve it. See Rivers.