← Implementation

Personal project / Unity / Wwise

Environmental Audio

Work in progress

A third-person audio project built in Unity with Wwise. Footstep sounds change with the surface the character walks on. Ambience changes between the open field, beach, spawn room and haunted house.

Project focus
Environmental sound design / Audio implementation
Tools
Unity 6 / Wwise

01 / GAMEPLAY REEL

Gameplay

0:24 · Stereo

Download

Playable demo

A Windows demo featuring footsteps and ambience across the field, beach and haunted house.

Windows x64 · ZIP · 193 MB · Work in progress

Request a passcode ↗

Extract the entire ZIP, then run “Environmental Audio.exe”.

Controls
WASD
Move
Shift
Run
Space
Jump
Right mouse drag
Camera
Mouse wheel
Zoom
R
Respawn

Wwise

Wwise project

Download the Wwise authoring project with the original audio, footstep containers, ambience Events and settings.

Wwise 2025.1.9 · ZIP · 116 MB

Request a passcode ↗

PROJECT OVERVIEW

Project overview

The level connects a glass spawn room, gravel roads, grass, a sandy beach and a haunted house. Each surface has its own footsteps, while ambience changes according to the character’s location.

For footsteps, Unity detects the ground beneath the character and triggers a Wwise Event at each foot-contact animation marker. Wwise uses the Surface Switch to select the terrain’s footsteps and vary the individual samples.

For ambience, Unity checks which location the character is in and selects its Wwise Event. The spawn room, beach and haunted house have their own ambience; open areas use the outdoor Event. When the Event changes, Unity fades out the previous ambience over 0.75 seconds and starts the new one. Moving between house rooms assigned to the same Event keeps the existing ambience playing without restarting it.

Wwise footstep setup

Wwise Game Syncs tab showing the Surface Switch Group and its seven values
Game Syncs → Switches → Player Footsteps → Surface

Surface Switch Group

Surface tells Wwise which ground the character is on: grass, gravel, sand, stone, tile, water or wood. Unity updates this value as the character moves, so the next footstep uses the matching sounds.

Actual Wwise Footsteps_Surface Switch Container: seven child Random Containers on the left, and Grass, Gravel, Sand, Stone, Tile, Water and Wood assignments on the right
Audio → Containers → Player Footsteps → Footsteps_Surface

Switch Container assignments

Footsteps_Surface is a Switch Container assigned to the Surface Switch Group. Its children, visible on the left, are the Random Containers that hold each terrain’s footsteps.

The Assigned Objects panel connects each surface to its sounds:

  • Grassfootsteps_grass
  • Sandfootsteps_sand
  • Waterfootsteps_water

Individual footstep samples

Each Random Container holds Sound SFX objects for individual steps. All objects for a surface reuse one source audio file, with a different trimmed region for each footstep. This avoids separate source files for every step.

Randomization in Wwise

Configured on each surface’s Random Container to reduce repetition:

Sample selection
Avoid previous 2 samples
Pitch randomization
±40 cents
Volume randomization
±1.5 dB

Play_Footstep Event

  1. Unity · Timing

    A foot-contact animation marker posts Play_Footstep through the character’s AkEvent component.

  2. Wwise · Event action

    The Event’s Play action targets Footsteps_Surface.

  3. Wwise · Sound selection

    The Switch Container reads Surface, selects the assigned Random Container and plays one footstep sample.

Unity footstep setup

Surface triggers set which footsteps to use. Animation events tell Wwise when to play them. Both connect to the same player object.

The box around the spawn room

This is the spawn room in Unity’s Scene view. The blue outline highlights its actual Box Collider: an invisible detection volume covering the tiled area. Crossing this boundary tells Unity that the player has entered or left the room.

Actual Unity Scene view of the spawn room, with its Box Collider bounds highlighted in blue
Footsteps - Tile selected in Unity · blue outline highlights the collider’s actual bounds. Click to enlarge.

Footstep areas across the map

The tiled spawn room is at the bottom of this view. Gravel paths cross the grassy field, leading west to the beach, east to the haunted house and north to the cave. Sand follows the shoreline, with the shallow-water area beside it. The house and its entrance porch use wood footsteps.

Unity map viewed from above, highlighting sand, shallow water, gravel paths, house and porch wood volumes, and the tiled spawn room.
Actual Unity Scene view · colored outlines trace the detection volumes. Click any image to enlarge.
Unity beach close-up with yellow sand mesh volumes, blue shallow water volumes and the adjoining gravel path.
Yellow: Sand · Blue: Water · Purple: the gravel path ends at the beach.

Sand and shallow water

The yellow and blue areas use Mesh Colliders shaped to follow the coastline. Their Is Trigger setting lets the player pass through while Unity detects which area they occupy.

Entering the sand selects Surface / Sand; entering shallow water selects Surface / Water. Coming back out of the water restores Sand, and leaving the beach for the field restores Grass.

Each area is made from several adjoining collider pieces. An exit check keeps the same surface selected while the player crosses between pieces.

Unity road network with the ten gravel detection volumes highlighted along the paths.
Purple volumes follow the roads instead of covering the surrounding grass.

Gravel paths

Ten convex Mesh Collider volumes follow the road shapes. The purple outlines show their coverage; the grass beside the roads remains outside them.

A surface check selects Gravel while the player is inside these volumes and restores Grass when they step off. Walking off the road onto sand, tile or wood changes the footsteps to that surface.

Unity haunted house and entrance porch, with both actual Box Collider volumes outlined.
Orange: house Box Collider · Pale orange: porch Box Collider.

Haunted house and porch

Two Box Colliders cover the house and its entrance porch. Both select Surface / Wood when the player enters.

Moving from the porch into the house keeps Wood selected. The exit check restores Grass only after the player leaves both wood areas.

These volumes select the surface. The animation markers still control when each footstep plays.

Unity Inspector with numbered highlights: 1 Box Collider and Is Trigger; 2 Tile on entry; 3 Grass on exit; 4 player target
The same Footsteps - Tile object in the Inspector · numbers match the explanation.

How that box changes footsteps

  1. 1

    Detect entry and exit

    Is Trigger is checked on the Box Collider. The player can pass through this volume; Unity reports when they cross its boundary.

  2. 2

    Entering selects Tile

    The first AkSwitch listens for AkTriggerEnter. Its Name is Surface / Tile, so entering the box selects tile footsteps.

  3. 3

    Leaving selects Grass

    The second AkSwitch listens for AkTriggerExit and sets Surface / Grass when the player leaves the box.

  4. 4

    Apply it to the player

    Both trigger components reference Mannequin Player. The switches have Use Other Object checked, so they update that player’s Surface value. The player’s next footstep Event then uses the selected surface.

Animation event timing

Animation events mark each foot contact in the walking and sprinting clips. Each marker sends a Footstep message to the visual graph, which checks movement and grounded state before triggering Wwise.

Unity Animation preview. Watch the playhead pass the highlighted footstep markers as the character walks.

From the marker to a footstep

Actual graph highlighting 1 Footstep event, 2 speed check, 3 grounded check, 4 AkEvent Handle Event
Follow the highlighted nodes in numbered order. The white lines carry the event through the checks.

The graph triggers Play_Footstep, and Wwise chooses a sound for the character’s current surface.

  1. 1

    Receive Footstep

    The Animation Event node receives the marker’s Footstep message.

  2. 2

    Check movement

    Unity checks that the character is moving, preventing footstep sounds while standing still.

  3. 3

    Check grounded state

    Get Grounded must be true to pass the second If. Standing still or being airborne prevents new footstep posts.

  4. 4

    Call the player’s AkEvent

    Handle Event calls the AkEvent component assigned on Mannequin Player.

Interactive footsteps

Drag the character onto tile, grass, gravel, sand, water or wood. Footsteps change immediately and keep looping where you leave it.

The map uses the level’s layout and exported footstep samples, played through browser audio.

Wwise ambience setup

Each location has a background sound that loops while the player is there. The haunted house also has a layer of short sounds chosen at random. Wwise controls this playback; Unity tells it which location’s ambience to start and when to stop it.

Wwise Audio hierarchy with location ambience sounds and the haunted-house folder highlighted.
Audio tab · Containers → Default Work Unit → Ambience. Click to enlarge.

Sounds grouped by location

  1. 1

    Background sounds

    The Ambience folder holds the sounds for the beach, outdoors, spawn room and cave. Each Sound SFX object plays that location’s background recording.

  2. 2

    Two layers for the haunted house

    The looping amb_haunted_house_base keeps a steady background underneath the short sounds in one_shots. These separate sounds add unexpected details that make the house feel active and unsettling.The Random Container changes their order, so the listener cannot easily anticipate which sound comes next.This keeps the ambience from feeling like the same fixed sequence repeating.

Haunted house gameplay

Explore the house with its looping background, randomized one-shots and wood footsteps.

Looping the background

  1. 1

    Enable + Infinite

    Here, amb_beach has both boxes checked under Loop. When the recording reaches its end, Wwise starts it again. It keeps repeating until playback is stopped, so Unity does not need to restart it every few seconds.

The amb_beach Sound SFX properties, highlighting enabled and infinite looping.
amb_beach · the checked boxes keep the beach recording repeating. Click to enlarge.
one_shots Random Container properties, highlighting random selection, continuous playback and infinite looping.
one_shots · follow the numbered playback settings. Click to enlarge.

Varying the house sounds

  1. 1

    Choose a short sound at random

    Play Type: Random makes Wwise choose from the sounds inside one_shots. Limit Repetition prevents the same sound from being selected twice in a row.

  2. 2

    Continue to the next sound

    Play Mode: Continuous means Wwise moves on to another sound when the current one ends, without waiting for another Event from Unity.

  3. 3

    Keep the layer running

    Loop and Infinite keep this random playback going until it is stopped. This adds changing details over the house’s steady background.

Starting both house layers

Unity posts the amb_haunted_house Event when the house ambience is needed. Its two Play actions start both layers together.

The amb_haunted_house Event with two Play actions targeting one_shots and amb_haunted_house_base.
Event Editor · both Play actions belong to the same haunted-house Event. Click to enlarge.
  1. 1

    The Event Unity calls

    amb_haunted_house is the Event name used to start the house ambience.

  2. 2

    Play the random layer

    The first action targets one_shots, starting the container’s continuous random playback.

  3. 3

    Play the background

    The second action targets amb_haunted_house_base, starting the background loop.

The other location Events each start their matching background sound—for example, the amb_beach Event plays the amb_beach Sound SFX.

Unity / Ambience zones

Unity ambience setup

Two custom Unity scripts handle the ambience. They are attached to GameObjects and appear as components in the Inspector. Ambience Zone defines each area and its Wwise Event, while Ambience Director checks the character’s location and changes the ambience.

Actual Unity Scene view with beach, field, spawn room and house ambience boundaries highlighted.
Unity Scene view · outlines follow the actual ambience zone bounds. Click to enlarge.

The house zones share the same Wwise Event, so moving between rooms keeps the ambience playing without restarting it.

Open field

amb_outdoors

The broad green zone covers the outdoor area around the buildings and paths.

Beach

amb_beach

The blue zone covers the shoreline. Sand and shallow water share beach ambience, while their footsteps change separately.

Spawn room

amb_spawn_room

The purple zone covers the glass room. Leaving it for the field changes to the outdoor ambience.

Haunted house

amb_haunted_house

The orange zones cover the house and its rooms. Their Event starts the background loop and random one-shots together.

Haunted House ambience zone Inspector highlighting Position and Size, Priority 50 and the amb_haunted_house Event.
Haunted House ambience zone · the numbered settings define its area and sound. Click to enlarge.

Defining a zone

  1. 1

    Area

    Position and Size define where the ambience plays.

  2. 2

    Priority

    Where zones overlap, the house ambience takes over from the outdoor ambience.

  3. 3

    Wwise Event

    amb_haunted_house starts the background loop and random one-shots.

Ambience Director Inspector highlighting Mannequin Player as Listener, the assigned Zones list, and amb_outdoors as Outdoor Event.
Ambience object · the Director connects the player, zones and Wwise Events. Click to enlarge.

Following the character

  1. 1

    Player

    The character whose position Unity checks.

  2. 2

    Zones

    The areas used to select the ambience.

  3. 3

    Outdoor Event

    The ambience used outside those areas.

When the character enters an area with different ambience, Unity starts its Wwise Event and fades out the previous ambience.

Try the ambience

Drag the character between the spawn room, field, beach and haunted house to hear the ambience change.

Original project audio played in the browser.

↑ Back to the gameplay reel