CHAPTER 06 D – Environment: Underwater

Created By: Game Audio Resource Ltd       Date: 20/07/2019    Version: 2.00

In this guide we will add Various underwater audio assets & Data that will be controlled by global underwater Wwise state, for when the player character is above and below water

Guide Steps:

  • STEP 01: Ambience Loop
  • STEP 02: Underwater Global Control
  • STEP 03: PlayerInWater Wwise State
  • STEP 04: Body Splash In / Out
  • STEP 05: Test & Integrity Report

Task Time Needed: Around 1 Hour


Video Guide


Written Guide

Chapter 06 D – Step 01
Ambience Loop

In this step we will assign an underwater loop asset to play when the player is underwater.

  1. Under the Actor-Mixer Hierarchy > Default Work Unit > Environment WWU, right click, select New child > Actor Mixer. Name the new mixer ENV_Underwater
  2. Drag your Underwater looping audio asset into the new mixer, place it under SFX, Environment > Underwater.
  3. Select the loop asset, then in the Property Editor > General tab window tick the loop box.
  4. In the Project Explorer > Events tab find the event Map_Loaded in the unused folder. Then Cut move it to the Environment work Unit.
  5. Select the event, then in the Event Editor, right click > New Action > Play.
  6. Drag the underwater loop asset from the Actor_Mixer hierarchy onto the new event Play line.
  7. In the properties of this new event instruction, change the fade time to 1
  8. Finally, we need to define only to play the asset when the player character is underwater.
    Return to the Audio tab Actor-Mixer …. Environment_Underwater Actor-Mixer.
    In the Property Editor select the States tab.
  9. Select Add State Group > Default Work Unit > PlayerInWater.
  10. In the States list change the Voice volume Value for No to -96 (Silence)
  11. We need to assign an output bus. Select the ENV_Underwater Actor-Mixer.
    In the Property Editor > Generals Tab assign the Output Bus to the … > SFX > Environment Mixer
  12. Now we can test the asset in Wwise.
    Select the Underwater looping audio asset.
    Then in the transport control, click on States, this will display the underwater state.
    Set the PlayerInWater state to Yes
    Press play or space bar
    You now hear the underwater asset.
    While the assert is playing, change the PlayerInWater state to No. The loop should fade out and stop playing.

Chapter 06 D – Step 02
Underwater Global Control

In this step we will add a global control for all assets, when the player is underwater.

  1. Under the Master-Mixer Hierarchy > Master Audio Bus, select SFX mixer.
  2. In the Property editor, select the states tab.
  3. Select Add State Group > Default Work unit > PlayerInWater.
  4. In the Voice Low-Pass filter column change the value of the PlayerInWater Yes state to 50.
  5. Then in the Bus Volume column change the Yes value to -5
    As this setting also affects the Underwater Mixer Bus. We need to offset the Underwater content.
  6. Select the ENV_Underwater Actor-Mixer. Then in the Property Editor > States tab.
    Add the following value changes for the Yes state
    Voice Low-pass = -25
    Voice Volume = +5

 

Chapter 06 D – Step 03
PlayerInwater Wwise State

This import step sets up the PlayerInWater state to work correctly depending on the situation in the game environment.

  1. In the Project Explorer > Events tab > unused folder, find the following events:
    SplashIn_Monster
    SplashIn_Player
    SplashOut_Monster
    SplashOut_Player
  1. Drag these 4 sound events into the Default Work Unit > Bodyfall Work Unit.
  2. Select the event SplashIn_Player. In the Event Editor list, right click and select: New Action > States > Set State
  3. In the Target field of this new action, right click select Set Target > Default Work Unit > PlayerInWater > Yes.
  • TIP: You have now defined that the PlayerInWater state Yes will play when the sound event SplashIn_Player is called via code. Basically, when the player character enters water (above waist height)
  1. Next click on the event SplashOut_Player. In the Event Editor list, right click and select: New Action > States > Set State
  2. In the Target field of this new action, right click select Set Target > Default Work Unit > PlayerInWater > No
  • TIP: You have now defined that the PlayerInWater state No will play when the sound event SplashOut_Player is called via code. Basically, when the player character exits water (above waist height)
  • TIP: We do not need to assign this state to the monster versions of these events:
    SplashOut_Monster
    SplashIn_Monster
    As the PlayerInWater state is coded to the player character only.
  • TIP: If you have the time to try assigning the PlayerInWater state to the Monster splash in/out events, I suggest to do so. It will give you more insight into how states work and improve diagnosing issues and bugs in the future.

Finally, we need to set a property to tell the engine at the start of the level not to play the water loop.

  1. Locate the Map_Loaded Event under the events tab > Default Work Unit > Environment, right click select New Action > States > Set States.
  2. Then in the target window select Set Target > Default Work Unit > PlayerInWater > No.

Chapter 06 D – Step 04
Splash In/Out

In this step we will add assets to play when an entity enters and exits water above waist height, using the SplashIn & SplashOut events.

  1. In the Actor-Mixer Hierarchy > Default Work Unit > Body , add 2 new random containers.
  2. Name the Random Containers:
    Bodyfall_Splash_Into_Water
    Bodyfall_Splash_Out_Of_Water
  3. Drag the associated audio assets In to the corresponding random containers.
    Place them under SFX > Body > Body_Splash
  4. Return to the 2 splash random containers, then assign the output bus in both containers to the Body mixer Bus.
  5. Now we need to associate these random containers to sound events.
    In the Project Explorer > Events tab locate the SplashIn_Player event under Bodyfall
    A Play property should be set up with Placeholder_Silence_One_Shot (from an earlier guide). Drag the Bodyfall_Splash_Into_Water random container onto the target box.
    Repeat this process with all 3 other Splash related events assigning the corresponding random containers to each target box in each event
  • TIP: Use the 2 window Project Explorer screen layout as described in the last Chapter (06_C)
  1. All data is now set up, Generate the sound banks.
  2. Save your Wwise project updates.

Chapter 06 D – Step 05
Test & Integrity Report

Lastly, we check our updates in game

  1. Boot up the game and connect Wwise to the game.
  2. Load the map Load Maps > more maps (3) > map island_pre
  • TIP: Is this a great map for testing underwater and large volumes of water audio content.
  1. Move the player character under water.
    The underwater loop should start to play as the players character goes underwater. The loop should then stop when the character comes out of the water.
    You will also notice the Test footsteps, play under water but are not affected by the volume and low pass values we set up. For now, Mute the TEST_Footstep Random Container.
  • TIP: In the upcoming Footstep guide, we will remove footsteps from playing under water and add water wades and bubbles to play instead.
  1. Finally run an integrity report to confirm no errors exist.
  • TIP: You will now notice the PlayerInWater State is no longer listed in the Integrity Report.
  • TIP: You may notice that, the splash In or Splash out sometimes triggers twice when entering or exiting water. Toward the end of this guide series we will overview limiting optimization and options

 

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close