Audio

The water sounds around a player: the open sea, the surf at the nearest shore, rivers and fluid water where they flow, still lakes, and a muffled world under water. One component listens to the water around the player and fades looping sounds of your project in and out. The plugin ships no sounds and none is required: a layer without a sound stays silent.

Set it up

  1. In the Pulse window (tab Workflow, step Set Up) click Add Automatically for the water audio. Every player controller then gets a Pulse Water Audio component. You can also add the component to your player controller or pawn yourself.
  2. Set looping sounds in Project Settings > Pulse > Water Audio, one per layer (see Sounds).

The component plays for the local player only. On a player controller or pawn it serves that player while it is locally controlled; on any other actor it serves the first local player. On a dedicated server it does nothing.

How it works

Every Update Interval (0.25 s) the component asks the water at the audio listener of the player (usually the camera) and at points on rings around it: 3 rings of 12 points within Radius (40 m), 37 points in one batch query. From the answers it decides how loud every layer is and where it plays; every layer then fades there within Fade Time. A silent layer stops, so it costs no voice. Points whose terrain or water is not streamed in yet are left out.

Layer Where it plays How loud
Open Sea At the listener, in 2D The share of ocean around the listener (near points count more), times the sea state factor.
Shore Where the ocean meets land: on each ray from the listener outwards, the first change between ocean and land The nearest shore decides: 1 at the listener, 0 at Radius, times the sea state factor.
Flowing Where rivers and fluid water flow For each point closeness times flow speed / Full Flow Speed (3 m/s); the loudest point decides.
Calm At the nearest still water: lakes and water that flows slower than Calm Speed (30 cm/s) The nearest still water decides: 1 at the listener, 0 at Radius.
Underwater At the listener, in 2D 1 while the listener is under water.

The sea state factor comes from the environment at the listener: 0.4 on a flat sea (it still laps), 1 at the authored sea state, up to 1.5 in a storm. Shore, Flowing and Calm play on the water surface, so the surf comes from below on a cliff and from above under water; they move smoothly to their new place when the player moves.

Under water every water layer except Underwater gets a low pass (Underwater Low Pass Frequency, 900 Hz), and the Underwater Sound Mix is pushed until the listener comes up again. Give that sound mix an EQ that muffles every sound of the game, not only the water.

Sounds

Use looping sounds: a Sound Wave with Looping on, a Sound Cue with a Looping node, or a looping MetaSound. Each layer has a Volume at full loudness.

Shore, Flowing and Calm come from where the water is. A sound without an attenuation of its own is spatialized by the component, without a falloff over the distance (the loudness already has it) and in 2D when the water is all around the listener. If your sound has an attenuation, turn off its volume attenuation (Enable Volume Attenuation); otherwise the distance counts twice.

Setting Meaning
Audio Component Adds the water audio to every player controller when it spawns. Off by default; Set Up turns it on.
Open Sea, Shore, Flowing, Calm, Underwater Looping sound and volume of each layer; none keeps the layer silent.
Underwater Sound Mix Sound mix pushed while the listener is under water.
Underwater Low Pass Frequency Low pass of the water layers under water (Hz).

Component properties

Property Default Meaning
Override Sounds, Sounds off Sounds of this component instead of the project settings, e.g. for a cave level.
Radius 40 m How far around the listener the water is heard.
Rings, Rays 3, 12 Rings of points around the listener and points per ring. More rays find narrow rivers and shores farther away.
Update Interval 0.25 s How often the water around the listener is asked again.
Calm Speed 30 cm/s Water bodies that flow slower are still water (Calm), faster ones flow (Flowing).
Full Flow Speed 3 m/s Flow speed at which flowing water is at full loudness.
Fade Time 0.75 s How long a layer takes to fade to its new loudness.

Get Loudness and Get Layer Location tell what the component hears (the loudness a layer fades to, before its volume, and where it plays); Is Listener Underwater whether the listener is under water. Use them for sounds of your own, e.g. gulls at the loudest shore or a breathing sound under water.

A narrow river between two rays of the outer ring can be missed. Raise Rays where rivers are narrow, or lower Radius.


This site uses Just the Docs, a documentation theme for Jekyll.