Underwater
When the camera goes below a DRW water surface, DRW draws the underwater look over the player’s view. You see:
- Water color and haze that build up with distance and depth, so far objects fade into the water color.
- Sun shafts through the water, broken up by the waves above.
- Caustics on the seafloor and on anything under the surface.
- The world above through the surface. Looking up you see the sky and the world above through a bright circle; outside it the surface mirrors the water below.
- The sun disc where it appears from under water, closer to straight up than in air.
- Beams from underwater lights such as torches and boat lamps.
- Drifting particles lit by the sun and sky, and a soft blur on distant objects in murky water.
- Exposure that adapts to depth, so deep water gets darker without going black.
It works in the ocean, lakes, pools and rivers. You do not need to set anything up: it is on by default for every local player.
How the underwater look is added
Section titled “How the underwater look is added”The underwater look is a component, DRW Underwater, that lives on whatever the local player is looking through. DRW adds it for you.
The project setting is under Project Settings > Plugins > Dynamic Real Water, in the Underwater section:
| Setting | Default | What it does |
|---|---|---|
| Auto Add Underwater | On | Adds a DRW Underwater component to the pawn each local player controls, as soon as the level has an ocean or a water body (lake, pool or river) with Enable Underwater on. Works with any character or vehicle. Pawns that already carry the component keep their own. |
| Underwater Component Class | Empty (the default component) | The component class that gets added. Pick a Blueprint child of DRW Underwater to change its settings for the whole project. Only editable while Auto Add Underwater is on. |
What happens at runtime:
- Every local player gets the look, split screen included. Dedicated servers never get it.
- The component only runs while a local player controller possesses the pawn. AI-controlled pawns and other players’ pawns stay idle.
- When the player switches pawns (boarding a boat, leaving it), the look follows the possessed pawn. If the new pawn has no DRW Underwater component, DRW adds one within half a second.
- A player controller with no pawn (spectating, camera-only cinematics, Movie Render Queue) carries the component itself. As soon as that controller possesses a pawn that has its own component, the controller’s copy switches off.
- The look shows only in a running game: Play In Editor, standalone, packaged builds and Movie Render Queue renders. It does not show in the editor viewport while you edit or scrub a sequence.
The shipped pawns BP_Dinghy, BP_Runabout, BP_Drone and BP_DRWFlyingPawn already carry a DRW Underwater component, so they use the settings on their own component.
Change the settings for one pawn
Section titled “Change the settings for one pawn”- Open the pawn Blueprint and add a DRW Underwater component (Add Component, search for DRW Underwater).
- Set its values in the Details panel under DRW Underwater.
- Auto Add Underwater sees the component and leaves this pawn alone.
Change the settings for the whole project
Section titled “Change the settings for the whole project”- Create a Blueprint class whose parent is DRW Underwater.
- Set its default values.
- Pick it in Project Settings > Plugins > Dynamic Real Water > Underwater Component Class.
Which water shows it
Section titled “Which water shows it”| Water | When the look shows |
|---|---|
Ocean (BP_DynamicRealWater) | Whenever the camera is below the ocean surface. The ocean has no switch of its own. Turning off Auto Add Underwater stops DRW from adding the component; pawns that carry their own (such as the shipped boats and drone) still show the look. |
| Lake, pool, river | While the camera is below the surface inside the body. Each body has Enable Underwater (default on); turn it off and that body never shows the underwater look. On a lake or pool it is under DRW WaterBody > Underwater in the Details panel, on a river under DRW Underwater. |
The look follows the real surface, waves included, so a camera bobbing at the surface goes in and out with the waves. Exposure, lens flare and exposure range changes fade in over the first meter below the surface instead of switching at once.
DRW Underwater component settings
Section titled “DRW Underwater component settings”All settings are under DRW Underwater in the component’s Details panel and are readable and writable from Blueprint. Resolution, Coverage and Bias of the sun shadows are in the advanced (expand arrow) part of the Sun Shadows group.
| Setting | Default | Range | What it does |
|---|---|---|---|
| Can Interact With Water | Off | Swimmer mode, see Swimmers and divers. Not replaced by the ocean. | |
| Underwater Exposure Compensation | -0.5 | -8 to 8 stops | Exposure change while underwater. Negative darkens; -1 halves the brightness. While active it replaces the scene’s own exposure compensation; 0 leaves exposure untouched. |
| Underwater Depth Darkening | 0.5 | 0 to 1 | How much darker the view gets as the camera goes deeper. Auto exposure would brighten deep water back to daylight levels; this keeps part of the darkening, based on the water’s color and clarity. 0 = full auto exposure (no darkening), 1 = like a fixed-exposure camera. |
| Underwater Exposure Adaptation | 4 | 0 to 10 stops | How many stops the camera may brighten underwater beyond the scene’s own exposure range. Sky systems often narrow the exposure range for their day and night look; this lets the camera adapt to the water without crushing it to black, while night stays night. 0 keeps the scene’s range. |
| Underwater Sky Color | 0 | 0 to 1 | How much the sky’s color tints the water. 0 keeps the water’s own color, 1 takes the sky’s. |
| Underwater Lens Flare Intensity | 0.1 | 0 to 16 | Lens flare intensity while underwater (the engine default is 1). While active it replaces the scene’s own value; 1 leaves it untouched. |
| Refracted Sun Disc | On | Draws the sun where it appears from under water (closer to straight up, moved by the waves) and hides the sky’s own sun disc while the camera is below the surface. | |
| Underwater Light Range | 5000 cm | 0 or more | Point and spot lights below the surface scatter into visible beams. Up to 8 lights are used, nearest first. Lights whose reach ends farther than this from the camera are skipped. |
| Sun Shadows | On | Shadows the sun shafts and caustics, so they stop at objects (a boat hull, a rock arch). Underwater it also replaces the engine’s own sun shadow with one that matches the light’s direction in the water. It has a rendering cost every frame while the camera is underwater, see Sun shadows and their cost. | |
| Sun Shadow Resolution | 512 | 128 to 2048 | Resolution of the sun shadows. Higher gives sharper shadow edges and costs more. |
| Sun Shadow Coverage | 6400 cm | 1000 to 51200 cm | World size covered by the sun shadows around the camera. Shafts farther than half of this from the camera are unshadowed. |
| Sun Shadow Bias | 25 cm | 0 to 500 cm | Depth tolerance before a point counts as shadowed. Raise it if the seafloor shows dark speckles. |
Exposure in practice
Section titled “Exposure in practice”Three settings work together. On the ocean they are called Exposure Compensation, Depth Darkening and Exposure Adaptation; on the component their names start with Underwater.
- Exposure Compensation sets the overall underwater brightness, the way you would with a camera.
- Depth Darkening decides how much darker the view gets as you dive deeper. Raise it toward 1 for a heavy, oppressive deep sea; lower it toward 0 if deep scenes must stay readable.
- Exposure Adaptation only matters when your sky or post-process setup clamps the exposure range (common with day/night sky systems). If underwater scenes look crushed at dusk or at depth, raise it; if night dives get too bright, lower it.
Because the underwater look overrides exposure compensation and lens flare while the camera is below the surface, keyframe or script these through the DRW settings rather than your own post-process volume.
Underwater lights
Section titled “Underwater lights”Any point or spot light below the water surface can light up the water around it. A light counts when it is visible, has Affects World on and an intensity above 0. Spot lights keep their cone, so a torch makes a beam. DRW picks the 8 nearest lights whose reach comes within Underwater Light Range of the camera. Lights above the surface never scatter into the water.
The sun underwater
Section titled “The sun underwater”DRW uses the directional light that drives the sky atmosphere as the sun (the first atmosphere sun light). If there is none, it uses the first visible directional light.
With Refracted Sun Disc on, DRW sets that light’s Atmosphere Sun Disk Color Scale to black while the camera is underwater and puts your value back when it comes up. If you animate that property yourself, turn Refracted Sun Disc off.
Sunlight in the water, the shafts and the caustics fade out as the sun sinks below about 15 degrees above the horizon, and are gone once it sets.
Sun shadows and their cost
Section titled “Sun shadows and their cost”The sun shadows render only while the camera is underwater (or within a meter above the surface) and the sun is above the horizon. They leave out the water itself, lighting and most effects, but they still draw every object in range again each frame. If underwater performance matters more than shadowed shafts:
- Lower Sun Shadow Resolution first (sharpness only).
- Lower Sun Shadow Coverage if your underwater scenes are small; keep it above twice the distance at which you want shafts shadowed.
- Turn Sun Shadows off to remove the cost entirely. Shafts and caustics then pass through objects.
Ocean underwater settings
Section titled “Ocean underwater settings”When the level has an ocean, the ocean’s own underwater settings drive the look. They are on the ocean actor (BP_DynamicRealWater), in the DRW Underwater category, and they replace the component settings of the same name on every player, in the ocean and in lakes, pools and rivers alike.
| Group | Setting | Default | Range | What it does |
|---|---|---|---|---|
| Optics | Scattering | (0.0043, 0.0054, 0.0065) | color | How much the ocean water scatters light, per color. Higher gives milkier, brighter water and stronger shafts. |
| Optics | Anisotropy | 0.7 | 0 to 0.95 | How much scattered light keeps heading away from the sun. Higher concentrates the glow around the sun. |
| Light | Ambient Strength | 1 | 0 or more (slider to 10) | Brightness of the sky light inside the water. It follows the sky’s own brightness, day and night. |
| Light | Sky Color | 0 | 0 to 1 | How much the sky’s color tints the water: blue by day, orange at sunset. Replaces Underwater Sky Color. |
| Light | Caustic Strength | 1 | 0 or more (slider to 10) | Brightness of the caustics on underwater surfaces. |
| Light | Shaft Strength | 1 | 0 or more (slider to 10) | Brightness of the sun shafts. |
| Light | Shaft Steps | 16 | 4 to 64 | Quality of the sun shafts (advanced). Higher is smoother and costs more. |
| Light | Light Range | 5000 cm | 0 or more | Replaces Underwater Light Range. |
| Light | Refracted Sun Disc | On | Replaces Refracted Sun Disc. | |
| Exposure | Exposure Compensation | -0.5 | -8 to 8 stops | Replaces Underwater Exposure Compensation. |
| Exposure | Depth Darkening | 0.5 | 0 to 1 | Replaces Underwater Depth Darkening. |
| Exposure | Exposure Adaptation | 4 | 0 to 10 stops | Replaces Underwater Exposure Adaptation. |
| Exposure | Lens Flare Intensity | 0.1 | 0 to 16 | Replaces Underwater Lens Flare Intensity. |
| Sun Shadows | Sun Shadows | On | Replaces Sun Shadows. | |
| Sun Shadows | Resolution | 512 | 128 to 2048 | Replaces Sun Shadow Resolution (advanced). |
| Sun Shadows | Coverage | 6400 cm | 1000 to 51200 cm | Replaces Sun Shadow Coverage (advanced). |
| Sun Shadows | Bias | 25 cm | 0 to 500 cm | Replaces Sun Shadow Bias (advanced). |
Ambient Strength, Caustic Strength, Shaft Strength, Shaft Steps and Anisotropy exist only on the ocean. While an ocean is in the level they also apply underwater in lakes, pools and rivers; in a level without an ocean they stay at fixed defaults. Scattering applies to the ocean water only: each lake, pool and river uses its own Underwater Scattering (see below).
All of these ocean settings except Shaft Steps and the Sun Shadows group replicate from the server to clients. Scattering, Anisotropy, Ambient Strength, Sky Color, Caustic Strength, Shaft Strength and the four Exposure settings can be keyed in Sequencer with ordinary property tracks (see Cinematics and Sequencer). Ocean presets (wave and visual data assets) do not change any of them.
Color and visibility with depth
Section titled “Color and visibility with depth”How far you can see and what color the water turns comes from the water’s absorption and scattering. The same values color the water seen from above, so the surface and the underwater view stay matched.
Ocean
- Absorption Color and Absorption: on the ocean’s Visual Data asset (category Color), or under DRW Color on the ocean when it has no Visual Data asset. Absorption Color is the color of the light the water absorbs: the default absorbs red most, which leaves blue-green water. Absorption (default 0.065, range 0.001 to 1) sets how quickly light is absorbed. Higher makes the water darker with depth and shortens how far you can see underwater.
- Scattering: under DRW Underwater on the ocean (table above). It adds haze, brightens the water and strengthens the shafts.
Lakes, pools and rivers
Each body uses its own Visual Data asset:
- Absorption Color and Absorption (category DRW WaterBody|Color, Absorption default 0.065, range 0.001 to 1). Absorption also sets how far you can see underwater in that body.
- Underwater Scattering (category DRW WaterBody|Underwater): light scattered per meter by particles in the water, which drives the haze, the light shaft strength and the distance blur. Clear pools sit around 0.005 to 0.05, lakes around 0.1 to 1.
To make murkier water, raise Scattering first (haze, milkier look), then Absorption (darker, shorter view). For crystal-clear water, lower both.
Caustics and light shafts
Section titled “Caustics and light shafts”- Ocean: caustics come from the ocean’s DRW Caustics settings (Enable Caustics, Caustics Follow Sun, Caustics Strength). Underwater, Caustic Strength and Shaft Strength in DRW Underwater scale how bright they look.
- Lakes, pools and rivers: turn caustics on or off per body with Enable Caustics; their brightness is Caustics Strength on the body’s Visual Data asset.
- Shafts move with the waves overhead, like the caustics.
- With Sun Shadows on, shafts and caustics stop at objects between the sun and the point being lit.
Swimmers and divers
Section titled “Swimmers and divers”By default the look shows whenever the camera is below a water surface. For a character that swims or dives, you may want it only while the character is actually in the water (for example, a camera that dips below the surface while the character still stands on a jetty).
- Give the pawn a DRW Buoyancy component (see the buoyancy reference).
- Add a DRW Underwater component to the pawn and turn on Can Interact With Water in its Blueprint defaults.
- The look now shows only while the pawn’s DRW Buoyancy component reports it in the water.
Moving between waters
Section titled “Moving between waters”The look always belongs to the water the camera is in, and it changes gradually where waters meet:
- River mouths. Over the last stretch of a river before it joins other water, the underwater haze fades toward that water, and midway along the stretch the caustics change over to those of the other water. The length of that stretch is the river’s Mouth Transition Length (category DRW Junction, default 3000 cm, 0 to 50000 cm; 0 = no transition). Where a river joins another river, the color fades over the same stretch.
- River plumes. Where a river runs into a lake, a pool or the sea, its color is carried out into that water instead: near the mouth, the underwater color of the lake or sea takes on the river’s color where the plume spreads. The river’s Plume Color Strength (category DRW Junction, default 1, 0 to 1) sets how much of the color travels out with the plume; the rest of the color change happens inside the river, over the Mouth Transition Length. At the default 1, the river keeps its own color right up to the mouth.
- River outlets. A river that flows out of a lake starts with the lake’s look (color, haze and caustics) and fades to its own over the Mouth Transition Length.
See Rivers for how river mouths and outlets connect.
Split screen and several local players
Section titled “Split screen and several local players”Each local player gets a DRW Underwater component on their own pawn (or controller) and the look follows that player’s camera. Two things follow the first local player’s camera only: the hull checks of surface masks (Mask Underwater Effects) and the area in which hull interiors are hidden.
Cinematics, spectators and renders without a pawn
Section titled “Cinematics, spectators and renders without a pawn”- No pawn. A local player controller without a pawn gets the component itself, so spectators, camera-only cinematics and Movie Render Queue renders still show the underwater look, seen through that controller’s camera.
- Cinematic mode. The effect is not hidden with the pawn when a cutscene or Movie Render Queue hides the player’s pawn, so underwater shots keep their look.
- Editor viewport. Sequencer previews in the editor viewport do not show the underwater look. Check underwater shots in Play In Editor or in a Movie Render Queue render.
For the Sequencer side (driving the waves from the sequence, presets over time) see Cinematics and Sequencer.
Dry spaces below the water line
Section titled “Dry spaces below the water line”Caves, tunnels, dry docks and boat hulls that sit below the water line would otherwise get the underwater look. Mask them out with a Water Masking Actor or a DRW Surface Mask; see Caves, docks and hull interiors.