Setting up the ocean
The ocean is one actor, BP_DynamicRealWater. It makes the waves, draws the water out to the horizon, maps the seabed for the shoreline surf, and holds every ocean setting: waves, lighting, color, foam, caustics and the underwater look. This page covers placing it, every setting group you tune on it, the shipped presets, and the Blueprint functions that change the sea while the game runs.
For what the wave controls do to the sea and how to combine them, read Ocean waves: wind, swell and layers. For surf on the coast, see Shoreline surf. For cost and quality, see Performance and quality settings.
Place the ocean
Section titled “Place the ocean”-
In the Content Browser, open Plugins > DynamicRealWater Content > Blueprints. If you do not see the Plugins folder, enable Show Plugin Content in the Content Browser settings.
-
Drag
BP_DynamicRealWaterinto the level. -
Set its Location to 0, 0, 0. The ocean’s Z is sea level, and floating objects use it as the calm water surface. With Infinite Ocean on (the default), X and Y must also be 0, or the depth map and the shoreline surf end up misaligned with the land.
-
Keep exactly one ocean in the level.
-
Leave your landscapes as they are. Landscapes are found automatically, including World Partition landscape proxies. Land built from static meshes (islands, breakwaters, harbor walls) goes into a Shoreline Obstacle.
-
Press Play. Over the first frames of play the ocean removes its mesh under land, builds the depth map and then the shoreline surf. Once the depth map is ready it fires On DRW Ready.
The ocean checks its setup and reports problems in Map Check and, when you play in the editor, in the PIE message log: the bare C++ class, missing LOD meshes or MPC_DRW, more than one ocean, an ocean away from X = 0, Y = 0 with Infinite Ocean on, an ocean away from Z = 0, and Shoreline on while Compute Depthmap is off.
To wait for the ocean from Blueprint (for example before spawning boats), get it with Get DRW Grid Manager and bind On DRW Ready, or poll Is DRW Ready. It becomes ready once the grid is built and the depth map is ready, or right away when Compute Depthmap is off.
How the settings are organized
Section titled “How the settings are organized”Select the ocean and look at the Details panel. The categories that matter:
| Category | What it holds |
|---|---|
| DRW Preset | Wave Data Asset, Visual Data Asset, Interaction Data Asset. Shown first. |
| DRW Ocean Spectrum | Wind, swell, Choppiness, Wave Seed, the wave layers (Cascade Settings), FFT Resolution, Water Quality. |
| DRW WPO and Normals | Normal Strength, detail normals, WPO Direction. |
| DRW Shoreline | All surf settings. See Shoreline surf. |
| DRW Lighting | Roughness, specular, scattering phase, refraction, sky light tint, smoothing. |
| DRW Color | Absorption, scattering color, ambient and backside light, color correction. |
| DRW Foam | Whitecap look, how foam forms, drifts and fades, foam textures. |
| DRW Caustics | Caustics on or off, strength, sun direction. |
| DRW Underwater | The underwater look while the camera is below the surface. |
| DRW Depth | How water depth changes waves, color, normals and foam. |
| DRW LOD Settings, DRW Grid Settings | The ocean mesh, the far ocean and the depth map. |
Many settings sit under each category’s Advanced arrow.
Own settings or data assets
Section titled “Own settings or data assets”The ocean can run on its own settings, or take them from data assets:
- A Wave Data Asset holds the waves: Enable FFT, FFT Resolution, wind, swell, Choppiness, Wave Seed, the layers, Normal Strength, detail normals and WPO Direction. While one is assigned, the ocean hides those settings and uses the asset’s values.
- A Visual Data Asset holds the look: lighting, color, foam, Enable Caustics and Caustics Strength, depth, smoothing and color correction. While one is assigned, the ocean hides those settings and uses the asset’s values.
- An Ocean Preset pairs one Wave Data Asset with one Visual Data Asset and default blend times, for switching both at once from Blueprint or in Sequencer.
- The Interaction Data Asset holds the ripples, wakes, splashes and their foam for objects moving through the water. When it is set, the ocean makes it the level-wide default of the water interaction system when play starts. See the Interaction Data Asset reference.
A few settings are in neither asset and always stay on the ocean: Animate In Editor, Water Quality, Foam Low Resolution Compensation, Wave Change Blend Time, Sky Light Tint Strength and Roughness, Caustics Follow Sun, Caustics Interaction Strength, Foam Texture, Foam Normal Texture, Foam Distance, Foam Pre Roll Seconds, all Underwater, Shoreline, LOD and Grid settings.
The ocean copies an asset’s values when you assign it and again when play starts. If you edit an asset that is already assigned, the level shows the change at the next play or when you assign the asset again.
BP_DynamicRealWater ships with no Wave or Visual Data Asset assigned, so it runs on its own settings: Wind Speed 20, the eight shipped layers, FFT Resolution 512 x 512 and Choppiness 2.
Shipped data assets
Section titled “Shipped data assets”All in DynamicRealWater Content > Blueprints > WaterStates (waves in Waves, looks in Visuals):
| Asset | Type | Contents |
|---|---|---|
DA_DefaultWaves | Wave Data Asset | Wind Speed 45.2, the eight shipped layers, no swell, Choppiness 1, FFT Resolution 256 x 256. |
DA_DefaultVisual | Visual Data Asset | The default look with stronger whitecaps: Foam Strength 1 (default 0.1) and Foam Breaking Threshold 0.02 (default 0.04). |
DA_DefaultPresent | Ocean Preset | DA_DefaultWaves with DA_DefaultVisual, blending waves over 2 s and the look over 1.5 s. |
DA_Interaction | Interaction Data Asset | Ripples, wakes and splashes for objects in the water. |
DA_DefaultWaves uses FFT Resolution 256 x 256 and Choppiness 1, so applying it to an ocean left at the Blueprint’s 512 x 512 and Choppiness 2 lowers both. Values not listed are the class defaults given in the tables below.
All wave settings are under DRW Ocean Spectrum on the ocean, or under Spectrum and Simulation in a Wave Data Asset. Defaults are those of BP_DynamicRealWater.
| Setting | Default | Range | What it does |
|---|---|---|---|
| Wind Speed | 20 | 5 to 80 | Strength of the wind (no physical unit). Higher values give longer, higher waves and a rougher sea. |
| Wind Direction | (1, 1) | -1 to 1 per axis | Direction in the X/Y plane the wind blows and the waves travel. Only the direction counts, not the vector’s length. |
A higher Wind Speed also makes the water look darker and foamier with the same look settings. If a stormy sea looks too dark, lower Absorption.
| Setting | Default | Range | What it does |
|---|---|---|---|
| Swell Height | 0 m | 0 to 10 m | Significant height of the swell, long waves from distant storms. 0 = wind sea only. |
| Swell Wavelength (Advanced) | 150 m | 10 to 1000 m | Length of the swell waves. Shown once Swell Height is above 0. |
| Swell Direction | (1, 1) | -1 to 1 per axis | Direction the swell travels, independent of the wind. Shown once Swell Height is above 0. |
The swell cannot be longer than the upper end of your longest layer’s Band (189 m with the shipped layers); longer values are capped there. For a longer swell, raise your longest layer’s Dominant Wavelength.
Shape, pattern and timing
Section titled “Shape, pattern and timing”| Setting | Default | Range | What it does |
|---|---|---|---|
| Enable FFT | On | Runs the wave simulation. Off makes the surface flat. | |
| Choppiness | 2 | 0 to 3 | Crest sharpness. 1 matches real waves; higher sharpens crests and folds them sooner, which also adds foam. The C++ class default is 1. |
| Wave Seed | 0 | 0 to 9999 | A different wave pattern with the same size and character. Can be keyed per shot in Sequencer. |
| Wave Change Blend Time (Advanced) | 1 s | 0 to 10 s | How long the water takes to morph into new wave settings in game, so floating objects are not thrown. 0 switches at once. |
| Animate In Editor | Off | Runs the waves in the editor viewport, and lets the detailed grid follow the editor camera. A DRW Water Time track in Sequencer drives the waves either way. |
FFT Resolution, Water Quality and Foam Low Resolution Compensation are in the same category; they trade detail for speed and are covered in Performance and quality settings.
Wave layers
Section titled “Wave layers”Cascade Settings on the ocean (or Layers in a Wave Data Asset) is the list of wave layers, up to eight. Each layer adds a range of wave lengths, which the Details panel shows as the layer’s title. See Layers for how to combine them.
| Setting | Range | What it does |
|---|---|---|
| Band | Read only | The range of wave lengths this layer adds, shown for FFT Resolution 512 x 512. |
| Dominant Wavelength | 0.05 to 1000 m (slider 0.25 to 256) | Center of the layer’s Band. Changing it moves the whole Band. |
| Wave Amplitude | 0 to 64 | Strength of the layer’s waves. Higher values give taller waves in this layer. |
| Choppiness | 0 to 3 (slider 0 to 2) | Crest sharpness of this layer, times the ocean’s Choppiness. |
| Wind Influence (Advanced) | 0.000001 to 16 | How tightly the layer’s waves line up with the wind. Higher gives long, parallel crests. |
| Opposing Wave Factor (Advanced) | 0.000001 to 128 | Strength of waves moving against the wind. |
| WPO Strength (Advanced) | 0.0001 to 10 | How strongly this layer moves the surface. 1 = as simulated. |
The eight shipped layers (on BP_DynamicRealWater and in all four wave assets), each with Wave Amplitude 1, Choppiness 1 and WPO Strength 1:
| Layer | Dominant Wavelength | Band | Wind Influence | Opposing Wave Factor |
|---|---|---|---|---|
| 0 | 94.3 m | 23.6 m - 189 m | 4 | 0.125 |
| 1 | 64.3 m | 16.1 m - 129 m | 2 | 0.25 |
| 2 | 32.2 m | 8.04 m - 64.3 m | 1 | 0.5 |
| 3 | 21.4 m | 5.36 m - 42.9 m | 0.5 | 0.25 |
| 4 | 10.7 m | 2.68 m - 21.4 m | 0.5 | 0.75 |
| 5 | 4.02 m | 1 m - 8.04 m | 0.5 | 0.75 |
| 6 | 2.68 m | 67 cm - 5.36 m | 0.5 | 0.75 |
| 7 | 1.79 m | 12 cm - 3.57 m | 0.5 | 0.75 |
The finest layer’s Band reaches shorter ripples at higher FFT Resolution; the 12 cm shown is for 512 x 512.
Working with layers:
- To add a layer, press + on the list. The new layer copies your finest layer and is placed one step finer. Then set its Dominant Wavelength.
- To get longer waves, raise your longest layer’s Dominant Wavelength (and Wind Speed, so the wind fills it). The longest layer sets the longest wind waves and the longest possible swell.
- Keep the list ordered from longest to shortest, so lower Water Quality tiers drop the finest layers first.
- Every layer costs GPU time on every frame. Removing layers (or lowering FFT Resolution) cuts that cost; Water Quality does not.
Normals and displacement
Section titled “Normals and displacement”Under DRW WPO and Normals (or Normals and WPO in a Wave Data Asset):
| Setting | Default | Range | What it does |
|---|---|---|---|
| Normal Strength | 96 | 1 to 128 | Strength of the main surface normal. About 41 matches the slope of the simulated waves; higher values sharpen the surface detail. |
| Detail Normal Strength (Advanced) | 0.125 (C++ class and wave assets: 0.25) | 0.00001 to 128 | Strength of the second, finer detail normal layer. |
| Detail Normal Tiling (Advanced) | 32 | 0.00001 to 512 | How often the detail normal texture repeats. Higher repeats it more. |
| WPO Direction (Advanced) | (1, 1, 1) | -1 to 1 per axis | Scales the surface movement per axis: X and Y the sideways motion of the water, Z the height. (1, 1, 1) leaves the waves unchanged. |
The look settings are on the ocean, or in a Visual Data Asset (under Lighting, Color, Foam, Caustics, Depth, Smoothing and ColorCorrection). Defaults are the class defaults, which BP_DynamicRealWater keeps.
Lighting
Section titled “Lighting”| Setting | Default | Range | What it does |
|---|---|---|---|
| Roughness | 0.04 | 0 to 1 | Surface roughness. Lower values give sharper reflections. |
| Specular | 0.25 | 0 to 1 | Intensity of the specular reflection. |
| Surface Specular (Advanced) | 1 | 0 to 16 | Extra specular intensity at glancing angles. |
| Phase (Advanced) | 0.8 | -1 to 1 | Forward scattering of light through the water, toward the viewer. |
| Phase 2 (Advanced) | -0.2 | -1 to 1 | Scattering in the opposite direction. |
| Refraction (Advanced) | 1.33 | 1 to 5 | How strongly the water bends the view of what is underneath. 1.33 is the value of real water. |
| Sky Light Tint Strength | 0.05 | 0 to 4 | Adds a soft sky light color on top of the reflection, strongest at glancing angles. An artistic control: it adds more light than a physically correct reflection would. 0 = off. |
| Sky Light Tint Roughness | 0.04 | 0 to 1 | How blurred the sky light is for the tint: 0 is a sharp mirror of the sky, 1 the sky’s average color. |
Under DRW Lighting > Smoothing (Advanced): Normal Smoothing, Roughness Smoothing and Specular Smoothing, each 0 by default (0 to 1).
Color and absorption
Section titled “Color and absorption”| Setting | Default | Range | What it does |
|---|---|---|---|
| Absorption Color | (0.19, 0.09, 0.09) | 0 to 1 | The color the water absorbs over distance, seen from above and underwater alike. It is the color removed, not the color you see: the default removes red most, so the water looks blue-green. |
| Absorption | 0.065 | 0.001 to 1 | How quickly light is absorbed. Higher values make the water darker and less transparent with depth and shorten how far you can see underwater. |
| Scattering Color Strength (Advanced) | 4 | 0 to 8 | Intensity of the subsurface scattering color. |
| Base Color Strength (Advanced) | 2 | 0 to 8 | Overall influence of the base surface color. |
| Hue Shift (Advanced) | -60 | -180 to 180 | Hue shift of the ambient and backside lighting. |
| General Strength (Advanced) | 32 | 0 to 64 | Overall strength of the ambient and backside lighting. |
| Ambient Strength (Advanced) | 2 | 0 to 64 | Strength of the ambient light. |
| Backside Strength (Advanced) | 2 | 0 to 64 | Strength of the backside scattering. |
| Peak Wave Height (Advanced) | 1.25 | 0 to 4 | Height factor for peak waves in the water color. |
| Peak Wave Strength (Advanced) | 1.5 | 0 to 4 | Strength of peak waves in the water color. |
Under DRW Color > Color Correction (Advanced): Offset (default 0, 0, 0) adds to the water’s final color; Gain, Brightness, Contrast and Saturation (default 1, 1, 1 each) multiply, brighten, add contrast and saturate it.
The ocean makes its own foam where wave crests break. Foam builds up on breaking crests, drifts downwind, stretches into streaks and fades. Big waves and short chop make separate foam, so you can keep whitecaps on big crests while chop foam stays brief.
Appearance:
| Setting | Default | Range | What it does |
|---|---|---|---|
| Foam Strength | 0.1 | 0 to 16 | Overall foam intensity. |
| Foam Color | (0.73, 0.82, 1) | 0 to 1 | Tint of the foam. |
| Foam Alpha Contrast (Advanced) | -0.2 | -1 to 1 | Contrast of the foam mask. |
| Foam Normal Strength (Advanced) | 1 | 0 to 16 | How much surface detail shows in foamy areas. |
| Foam Normal Fade Start (Advanced) | 0.001 | 0 to 0.1 | Foam amount where the foam normal starts to show. Raise it if the foam normal shows on water without visible foam. |
| Foam Normal Fade End (Advanced) | 0.004 | 0 to 0.1 | Foam amount where the foam normal reaches full strength. |
| Foam Surface Strength | 1 | 0 to 1 | How much foam is lit as a solid surface (sun, shadows, sky) instead of glowing inside the water. 0 gives the older, glowing look. |
| Foam Surface Albedo (Advanced) | 0.7 | 0 to 1 | Brightness of lit foam. Fresh whitecaps reflect about 0.5 to 0.8 of the light, old thin foam much less. |
| Foam Surface Roughness (Advanced) | 0.6 | 0 to 1 | Roughness of lit foam. Higher spreads the sun glint over the bubbles. |
How foam forms and fades (all Advanced except the first):
| Setting | Default | Range | What it does |
|---|---|---|---|
| Enable Foam Accumulation | On | Lets foam build up and leave trails. Off shows foam only where crests break right now. | |
| Foam Breaking Threshold | 0.04 | 0 to 4 | How hard a crest must break before it makes foam. Raise it until calm seas clear completely. |
| Foam Accumulation Rate | 12 | 0 to 20 | How fast breaking crests build up foam, so how promptly crests foam up. |
| Foam Max Accumulation | 3 | 0 to 8 | Ceiling on the built-up foam. |
| Foam Decay Rate | 0.4 | 0 to 10 | Proportional fade of trailing foam, per second. |
| Foam Decay Floor | 0.15 | 0 to 4 | Fixed fade per second, so old foam clears completely. |
| Foam Advection Strength | 1 | 0 to 16 | Downwind drift of trailing foam. 0 keeps foam fixed to the wave that made it. |
| Foam Wind Reference | 5 | 1 to 200 | Wind Speed at which breaking makes foam at the normal rate. Calmer seas make less, windier seas more. |
| Foam Wind Exponent | 1.25 | 0 to 8 | How steeply foam grows with Wind Speed. 0 makes foam ignore the wind. |
| Foam Large Wavelength | 3 m | 0.1 to 100 m | Layers with a Dominant Wavelength at or above this are the big waves. Foam on their crests is big foam; the rest is small foam (chop). |
| Foam Spread | 0.05 | 0 to 2 | How fast big foam patches stretch along the wind, in square meters per second. Spreading also softens their edges; 0 keeps them sharp. |
| Foam Spread Cross Wind | 0.1 | 0 to 1 | Share of Foam Spread that also widens big foam across the wind. 1 grows round patches; lower values draw them into wind streaks. |
| Foam Small Decay Rate | 3 | 0 to 20 | How fast small foam fades, per second. Higher keeps chop foam brief. |
| Foam Small Strength | 0.5 | 0 to 4 | Brightness of small foam relative to big foam. |
| Foam Stretch | 0 | -1 to 4 | Contrast of the ocean’s own foam. Above 0 thins weak foam and thickens dense foam; below 0 evens it out. Wakes and shoreline foam are not affected. Shown while accumulation is on. |
| Foam Pre Roll Seconds | 2 s | 0 to 10 s | Seconds of foam rebuilt when the water clock jumps, for example when you scrub a sequence, so the foam does not start empty. 0 = off. Shown while accumulation is on. |
Textures and reach:
| Setting | Default | What it does |
|---|---|---|
| Foam Texture | T_DRW_OceanFoam_BaseColor | Foam pattern, used by the ocean and the shoreline foam. A replacement needs the same channel layout. |
| Foam Normal Texture | T_DRW_OceanFoam_Normal | Foam normal map, used by the ocean and the shoreline foam. |
| Foam Distance (Advanced) | 512 m | How far from the camera the ocean’s own foam reaches (128 to 4096 m). |
To swap the foam textures while playing, call Set Foam Textures on the ocean (on the server in multiplayer; clients follow). Leaving an input empty keeps the current texture.
Caustics
Section titled “Caustics”Caustics are the moving patterns of focused sunlight that the waves throw on underwater surfaces.
| Setting | Default | Range | What it does |
|---|---|---|---|
| Enable Caustics | On | Turns the caustics on or off. Off also removes their GPU cost. | |
| Caustics Follow Sun | On | Aims the caustics with the scene’s sun: the directional light used as the atmosphere sun, or else the first visible directional light. Off: the direction comes from Set Caustics Light Direction. | |
| Caustics Strength | 1 | 0 to 10 | Overall caustics intensity. |
| Caustics Interaction Strength (Advanced) | 1 | 0 to 5 | How strongly ripples and wakes disturb the caustics. 0 = off. |
These use the depth map built when play starts (see Shoreline surf). The waves shrink in shallow water, and floating objects feel the same smaller waves.
| Setting | Default | Range | What it does |
|---|---|---|---|
| Depth Wave Strength | (2, 2, 3) | 1 to 8 | How much depth influences the wave strength. Use it to fade the waves in shallow regions. |
| Depth Absorption Strength | 1 | 0 to 8 | How depth changes absorption. Higher values darken the water faster as it gets deeper. |
| Depth Normal Strength | 1 | 0 to 8 | Depth-based multiplier for the surface normals, to reduce surface detail in shallow water. |
| Depth Foam Strength | 1 | 0 to 8 | How depth changes the foam intensity. |
Underwater
Section titled “Underwater”The DRW Underwater settings on the ocean set the underwater look while the camera is below the surface: light scattering and the sky’s tint (Optics, Light), caustics and sun shaft strength, underwater lights, the refracted sun disc, exposure and lens flare (Exposure), and sun shadows for the shafts and caustics (Sun Shadows). While an ocean is in the level, these override the settings of the DRW Underwater component on the player’s pawn. The underwater look is added to the local player’s pawn automatically (Project Settings > Plugins > Dynamic Real Water > Auto Add Underwater). See the DRW Underwater component reference for each setting, and Performance and quality settings for the costly ones.
The ocean mesh and the far ocean
Section titled “The ocean mesh and the far ocean”The ocean draws a detailed grid of 64 m cells around the camera. Cells near the camera use dense meshes; farther cells use coarser ones. Past the detailed grid, a flat far ocean continues to the horizon.
Under DRW Grid Settings:
| Setting | Default | What it does |
|---|---|---|
| Grid Resolution | 256 x 256 | Number of 64 m cells per side of the detailed grid, which is also the size of the depth map and shoreline bake area. See the table below. Changing it rebuilds the grid. |
| Infinite Ocean | On | The detailed grid follows the camera and the far ocean fills to the horizon. The actor itself stays at the world origin. Off: the grid stays around the actor and there is no far ocean. |
| Far Ocean Ring Count (Advanced) | 6 | Number of far ocean rings (0 to 12). Each ring reaches much farther than the one before, so a few rings cover the distance to the horizon. |
| Far Ocean Ring Width (Advanced) | 8 | Thickness of each ring (2 to 32). Wider rings reach farther. |
| Grid Update Interval (Advanced) | 0.2 s | How often the grid re-picks each cell’s detail level as the camera moves. |
| Compute Depthmap | On | Removes the ocean under land and builds the depth map when play starts. The shoreline surf and the depth settings need it. |
| Depth Quality, GPU Depth Capture, Client Depth Map Delay, Grid Removal Threshold, Blur Radius (Advanced) | The depth map. See Shoreline surf. |
| Grid Resolution | Detailed grid and bake area | Detailed grid reaches from the camera |
|---|---|---|
| 128 x 128 | 8.2 km square | about 4.1 km |
| 256 x 256 (default) | 16.4 km square | about 8.2 km |
| 512 x 512 | 32.8 km square | about 16.4 km |
The far ocean is drawn flat, without wave displacement, has no collision and casts no shadows. With the default rings and Grid Resolution 256 x 256 it reaches about 74 km from the camera.
Under DRW LOD Settings:
| Setting | Default | What it does |
|---|---|---|
| LOD1 Grid Distance | 4 | Cells from the camera within which cells use the LOD1 mesh. Closer than one cell (64 m) they use LOD0. |
| LOD2 Grid Distance | 8 | Cells from the camera within which cells use the LOD2 mesh. |
| LOD3 Grid Distance | 10 | Cells from the camera within which cells use the LOD3 mesh. Farther cells use LOD4. |
| LOD1 Far Grid Distance | 3 | Beyond this many cells, LOD1 cells switch to a mesh with a quarter of the triangles and the same material. 0 keeps the full LOD1 mesh. |
| Single Layer Water Max LOD | 1 | Cells up to this LOD use the near Single Layer Water material (1 to 4); farther cells use cheaper materials. The two reflect differently, so their border can show as a seam in the sun glitter: keep it far out. Each LOD added costs GPU time. Applied when play starts. |
| LOD4 Skirt Depth | 1 cm | How far the skirt walls on LOD3 and LOD4 cell edges hang below sea level, to close gaps between cells (0 to 5000 cm). 0 = no skirts. |
| LOD4 Skirt Top Offset | 1 cm | How far below sea level the top of those skirt walls sits, so they stay hidden under shallow troughs (0 to 1000 cm). |
| Coarse LOD Wave Correction | 1 | Restores wave detail the coarser meshes cannot show, so farther rings keep the brightness of the near rings instead of stepping lighter at each LOD border (0 to 1). 0 = off. |
| Coarse LOD Wave Max Shift (Advanced) | 400 cm | Limit on how far that correction may shift the wave pattern, for grazing angles near the horizon (0 to 2000 cm). |
The LOD1, LOD2 and LOD3 distances are scaled down by lower Water Quality tiers.
Changing the sea and the look at runtime
Section titled “Changing the sea and the look at runtime”You can change the sea state and the look while the game runs, with a blend so the change is gradual and floating objects are not thrown.
-
Make the assets: for example two Wave Data Assets, one calm and one rough (see Make your own presets), or two Ocean Presets.
-
In any Blueprint (Game Mode, Level Blueprint, a weather manager), call
Set Ocean Wave Datawith the new Wave Data Asset, a Blend Duration in seconds and a Blend Easing. No ocean reference is needed; the node finds the ocean in the level. -
To change the look with it, call
Set Ocean Visual Data, or use oneSet Ocean Presetcall for both. -
In multiplayer, call these on the server. They start the same blend on every client.
The blend moves every number smoothly from the current values to the new asset’s. Settings that cannot be blended (Enable FFT, Wave Seed, FFT Resolution, Enable Foam Accumulation, Enable Caustics) switch at the halfway point, and when the blend finishes the asset is applied exactly. Starting a new blend while one is running continues from the current state.
Functions on the ocean
Section titled “Functions on the ocean”Call these on the ocean actor (get it with Get DRW Grid Manager):
| Node | C++ name | What it does |
|---|---|---|
Set Wave Data | SetWaveData | Blends to a Wave Data Asset over Blend Duration (default 2 s) with Blend Easing (default Linear). Server only. |
Set Visual Data | SetVisualData | Blends to a Visual Data Asset (default 1.5 s). Server only. |
Set Ocean Preset | SetOceanPreset | Blends to a preset’s Wave Data and Visual Data, using the preset’s blend durations, or 2 s and 1.5 s when Use Preset Blend Durations is off. Linear. Server only. |
Apply Wave Data Instant | ApplyWaveDataInstant | Applies a Wave Data Asset at once, without blending. On the server, clients follow. |
Apply Visual Data Instant | ApplyVisualDataInstant | Applies a Visual Data Asset at once. On the server, clients follow. |
Is Wave Blending, Is Visual Blending, Is Blending | True while a blend runs. | |
Get Wave Blend Progress, Get Visual Blend Progress | Blend progress, 0 to 1, after easing. | |
Set Water Quality | SetWaterQuality | Changes the rendering quality on this machine only. See Performance. |
Set FFT Resolution, Get FFT Resolution | SetFFTResolution | Changes the wave simulation resolution on this machine only. Costs a one-frame hitch. |
Set FFT Enabled, Is FFT Enabled | SetFFTEnabled | Turns the wave simulation on or off (off = flat water). Has no effect while a Wave Data Asset is assigned, whose Enable FFT wins. |
Set Foam Textures | SetFoamTextures | Swaps the foam texture and foam normal. Server; clients follow. |
Request Shoreline Rebake | RequestShorelineRebake | Rebuilds the depth map and the surf over the next frames, on this machine. See Shoreline surf. |
Get Sea Level | GetSeaLevel | Height of the calm sea surface (cm): the ocean’s Z. |
Get Depth World Coverage | GetDepthWorldCoverage | Side length of the depth map and bake area (cm). |
Is DRW Ready, On DRW Ready | IsDRWReady, OnDRWReady | Whether initialization is complete; the event fires once when it is. |
From C++, SetWaveDataWithCurve and SetVisualDataWithCurve take a UCurveFloat instead of an easing.
Blueprint library nodes
Section titled “Blueprint library nodes”These find the ocean themselves and return false when the level has none. See the Blueprint library reference for each node.
| Node | Does |
|---|---|
Get DRW Grid Manager | Returns the ocean in the level. |
Set Ocean Wave Data, Set Ocean Wave Data Instant | Same as Set Wave Data and Apply Wave Data Instant. |
Set Ocean Visual Data, Set Ocean Visual Data Instant | Same as Set Visual Data and Apply Visual Data Instant. |
Set Ocean Preset | Same as Set Ocean Preset with the preset’s blend durations. |
Set Ocean FFT Enabled, Is Ocean FFT Enabled | Same as Set FFT Enabled and Is FFT Enabled. |
Set Ocean FFT Resolution, Get Ocean FFT Resolution | Same as Set FFT Resolution and Get FFT Resolution. |
Is Ocean Wave Blending, Is Ocean Visual Blending, Is Ocean Blending | Blend state. |
Set Caustics Light Direction, Get Caustics Light Direction | The caustics light direction used while Caustics Follow Sun is off. Local, not replicated. |
Is DRW Ready | Whether the ocean has finished initializing. |
Get Water Surface At Location | Water height, normal and velocity at a point, on the ocean and on rivers, lakes and pools. Ocean answers trail by one or two frames. |
Blend easing
Section titled “Blend easing”| Blend Easing | Shape |
|---|---|
| Linear | Constant rate of change. |
| Ease In | Starts slow, speeds up. |
| Ease Out | Starts fast, slows down. |
| Ease In/Out | Slow start and end, fast middle. |
| Expo In, Expo Out, Expo In/Out | Exponential versions of the above, more pronounced. |
| Circular In, Circular Out, Circular In/Out | Circular versions of the above. |
A Blend Duration of 0 is treated as 0.01 s. For no blend at all, use the Instant nodes.
Changing single settings
Section titled “Changing single settings”You can also set individual ocean properties from Blueprint, for example Wind Speed for a storm that builds up. In game, changes to the wind, the layers or the Wave Seed cross-fade over Wave Change Blend Time, and swell changes ease in over about the same time. A later Set Wave Data or Apply Wave Data Instant overwrites them.
What replicates when you set it on the server: Wind Speed, Wind Direction, the swell, Choppiness, Wave Seed, the layers, Enable FFT, Normal Strength, WPO Direction, Wave Change Blend Time, the Shoreline settings, the foam textures, Sky Light Tint Strength and Roughness, Caustics Follow Sun, Foam Distance, Foam Pre Roll Seconds, the lit-foam settings (Foam Surface Strength, Albedo and Roughness), Foam Normal Fade Start and End, Foam Wind Reference and Exponent, Foam Large Wavelength, Foam Spread and Spread Cross Wind, Foam Small Decay Rate and Small Strength, Foam Stretch, Coarse LOD Wave Correction and Max Shift, and most Underwater settings.
What does not replicate: everything else, including the colors and color correction, absorption, the lighting settings, Foam Strength, Foam Color, Foam Alpha Contrast, Enable Foam Accumulation and the foam build-up and fade settings (Breaking Threshold, Accumulation Rate, Max Accumulation, Decay Rate, Decay Floor, Advection Strength), Enable Caustics, Caustics Strength, the depth settings, the detail normals, FFT Resolution and Water Quality. To change the look for every player, use Set Visual Data instead.
Sequencer
Section titled “Sequencer”Most wave and look settings on the ocean can be keyed in Sequencer, among them Wind Speed, Wind Direction, the swell, Choppiness, Wave Seed and Normal Strength. To change presets over a shot, add a DRW Ocean Preset track: each section holds an Ocean Preset, overlapping sections cross-fade, and the ocean returns to its own look when the track stops.
Make your own presets
Section titled “Make your own presets”-
Tune the waves on the ocean itself first, with no Wave Data Asset assigned and Animate In Editor on, so changes show immediately.
-
Duplicate the shipped
DA_DefaultWaves, or create one with Content Browser > Miscellaneous > Data Asset > DRW_WaveDataAsset. Copy your values into it. Give it a Display Name if you like. -
Do the same for the look with a copy of
DA_DefaultVisual(classDRW_VisualDataAsset). -
Create an Ocean Preset (class
DRW_OceanPresetDataAsset), set its Wave Data and Visual Data, and its Default Wave Blend Duration (default 2 s) and Default Visual Blend Duration (default 1.5 s), each 0 to 30 s. -
Assign the assets on the ocean under DRW Preset, or switch to them at runtime with
Set Ocean Preset.
Data validation reports an Ocean Preset without Wave Data or Visual Data as an error. Set Ocean Preset still applies whichever of the two is set.