Created By: Game Audio Resource Ltd Date: 23/08/2018 Version: 2.00
In this guide we will implement a simple blend container that will play heart beat and vocal breath audio content based on the player characters health values.
Guide Steps:
- STEP 01: Wwise Heart Hierarchy
- STEP 02: Adding Breath Exertions
- STEP 03: Test & Integrity Report
Task Time Needed: 1>2 Hour
Video Guide
Written Guide
Chapter 13 B – Step 01
Heartbeat Hierarchy
In this step we will set up a hierarchy structure so the heart beat asset will intensify as the player characters health value decreases
HIERARCHY
- Navigate to the Project Explorer > Audio tab > Actor-Mixer Hierarchy > Default Work Unit > UI Wwise Work Unit > UI_Action Actor Mixer
Right click the Actor Mixer, then select New Child > Blend Container
Name it: UI_Action_Health_Player - Right click the Blend Container, then select: New Child > Random Container.
- Copy the Random Containers to that you have 6 Random Containers.
Name each one, one of the following
> Breath_Heavy
> Breath_Medium
> Breath_Light
> HeartBeart_Fast
> HeartBeat_Medium
> HeartBeat_Slow - Drag in associated looping audio assets for the different heart beat speeds and vocal content under the associated Random Containers
Place them under the path: SFX > UI > UI_Action - Select one of the looping audio assets, then in the Property Editor > General Settings tab tick the loop box.
Then apply the same loop box tick to all other 5 looping audio assets. - Selected the Blend Container, then in the Property Editor > General Settings tab, click on the Blend Tracks > Edit UI Button
- Add a new Blend Track via the New Blend Track UI Button at the top of the Blend Track Editor Window.
Then add the following
Name the Blend Track: Heart Beat
Tick the crossfade box
Then assign the following Game Parameter: Game Parameters > Default Work Unit > Player Health - Close the Blend Track Editor window.
- With the Blend Container selected, in the Contents Editor Drag the different heart beat audio assets on to the HeartBeat Blend track list. Start with the fast asset first then medium, then Slow
- Open the Blend Track Editor window again.
- Assign the following values:
The fast heart beat to start at 0 and to finish at 10
The medium heartbeat to start at 10 and finish at 30
The slow heart beat to start at 30 and finish at 50
- TIP: What these values indicate is at what player character health values the different speed assets will play at. E.g. if the player characters heath value is between 10>30 the medium heart beat audio asset will play.
Do not cross fade these 3 assets. If you do then 2 different heart beat speeds will play at the same time
- Close the Blend Track Editor Window.
ATTENUATION
For a single player game as the player Character is in front of the camera, we can leave associated content as 2D.
However, for multi-player games you will need to add an attenuation “if” code has been correctly implemented to handle each player character individually.
EVENT
- Navigate to the Project Explorer > Events tab
Locate and select the event: Map_Loaded
In the Event Editor > right click the list, then select New Action > Play. - Navigate back to the Audio tab > Actor-Mixer Hierarchy > Blend Container, then drag the Blend Container on to the new Event Play Action line.
- TIP: This enables the event to be loaded at the start of any new map.
- Return to the Events tab, Locate and select the event: Death_Player
Then in the Event Editor List, right click, then select New Action > Stop > Stop. - Navigate back to the Audio tab > Actor-Mixer Hierarchy > Blend Container, then drag the Blend Container on to the new Event Stop Action line.
- TIP: This tells the game to stop playing the heart beat event when the player character dies
While testing these processes we discovered that randomly the heart beat would restart playing between the player character death and loading a new map.
Add the following steps to stop this issue if it arises.
NOTE: This events state properties will be set up in the next Chapters guide. So, for now it will not work.
- Return to the Events tab. Then locate and select the event: Map_Completed.
Then in the Event Editor > List, right click, then select New Action > Stop > Stop. - Navigate back to the Audio tab > Actor-Mixer Hierarchy > Blend Container, then drag the Blend Container on to the new Event Stop Action line.
- Save your Wwise Project updates and Generate the Sound Banks.
Chapter 13 B – Step 02
Adding Breath Exertions
In this step we will assign the vocal breath exertions to the base heart beat hierarchy based on the player character health value.
We will also use a simple process to silence the vocal breaths if a vocal exertion Is triggered by the player character,
NOTE: Due to the implemented Audio busses listed, this process will not affect the heart beat content set up in step 01.
HIERARCHY
- Navigate to the Project Explorer > Master-Mixer Hierarchy > Default Work Unit > Master Audio Bus > SFX > Vocal Audio Bus.
Right click then select, New Child > Audio Bus
Name it: Vocal_Player_Breath - Locate and select the Vocal_Player Audio Bus (that we added in a previous Chapter 09)
Then in the Property Editor > Auto Ducking tab, click on the Insert… UI Button
Then assign the following Audio Bus: Vocal_Player_Breath
Then Select the Vocal_Player_Breath Audio Bus in the Busses list. Then change the following values:
Volume = -96
Fade Out = 0.2
Fade In = 0.5
Recovery time: Change to 0
- TIP: What these settings do, is tell Wwise that if any content that is assigned to the Audio Bus Vocal_Player is triggered, then to silence any content that is assigned to the Vocal_Player_Breath Audio Bus.
For example, all player character vocal exertion hierarchy is assigned to the Output Bus Vocal_Player. The Player_Health breathes Output Bus is assigned to the Vocal_Player_Breath Audio bus. So, when e.g. the player character triggers a Pain vocal, if the player character health is below 50 the breath assets will then be silenced until the Pain vocal has stopped playing.
As we have assigned a Fade in and a Fade out, the breaths will naturally stop and start without noticeable changes.
- Navigate to the Project Explorer > Audio tab > Actor-Mixer Hierarchy > Default Work Unit > UI > UI_Action > UI_Action_Player_Health Blend Container.
- With one of the Breath Random Containers selected, in the Property Editor > General Settings tab > Output Bus, Tick Override parent, then assign the following path: Master Audio Bus > Environmental > SFX > Vocal > Vocal_Player_Breath.
Then add this audio bus to the other 2 breath Random Containers. - With the Blend Container selected, in the Property Editor > General Settings tab, click on the Blend Tracks Edit… UI button
- Add a New Blend Track via the UI button at the top of the Blend Track Editor Window.
- Add the following settings:
Name it: Vocal_Breath
Tick the Crossfade box
Then assign the following Game Parameter: Game Parameters > Default Work Unit > Player Health - Close the Blend Track Editor Window.
- Select the Blend Container, then in the Contents Editor, Blend Tracks List assign the 3 breath audio assets starting with Heavy, then Medium and then Light.
- Re-open the Blend Track Editor window.
Then set the following values
> Breath_Heavy = Start at 0 and finish at 10
> Breath_Medium = Start at 10 and finish at 30
> Breath_Light = Start at 30 and finish at 50
- TIP: So much like step 01 heartbeat, depending on the player Characters health value will depend on what audio asset gets played.
- Close the Blend Track Editor window
- Save your Wwise Project updates and Generate the Sound Banks.
ATTENUATION
For a single player game as the player Character is in front of the camera we can leave associated content as 2D.
However, for multi-player games you will need to add an attenuation if code has been correctly implemented to handle each player character individually.
EVENT
No new event is needed to be hook up, as the Blend Container was assigned to an event in Step 01.
Chapter 13 B – Step 03
Test & Integrity Report
In this step we will test our updates in game
- Boot up the Cube game and connect Wise to the Cube game.
- In the Actor-Mixer Hierarchy Solo the Blend Container UI_Action_Health_Heartbeat and the Vocal_Player Actor-Mixers.
- Change to the Wwise Layout to Profiler.
- Filter the capture log by the UI_Action_Health_Heartbeat Blend Container.
- In game change to a Single player map.
- Wait for enemies to spawn and allow the player character to get hit, until the player character dies. You will hear the Heartbeat & Vocal breath content after the player characters health values drops to below 50.
- Add any balancing changes you wish to add.
- Close the game.
- Save your Wwise Project updates and Generate the Sound Banks.
- Finally run a Wwise Integrity Report to validate your Hierarchy data updates.