Created By: Game Audio Resource Ltd Date: 09/11/2019 Version: 1.00
Wwise UE4: Chapter 04 C– Character:
In this guide we expand on the pipeline used in Chapter 04B so that we can control the velocity of the player character footsteps and armour volumes via an RTPC.
This allows for a more natural weighted volume depending on the player characters speed of movement.
- STEP 01: Getting Velocity Speed Value
- STEP 02: Wwise Data
- STEP 03: Unreal AnimBP
- STEP 04: Test
Download the free associated written guide:
Getting Velocity Speed Value
Before we can set up the Wwise RTPC we need to know what speed the player character moves at.
To do this we update the AnimBP to display on screen the Velocity speed of the player character when the player character moves.
- Open the AnimBP
- In the Event Graph, next to the Set (‘IsMoving’) Comment Box, right click the graph, then in the search box, type: Print string. Selecting it adds it to the graph.
- Connect the Print String node to the SET (is Moving) node.
- Then connect the Print String > In string input to the Vector Length > Return Value output
This will create a conversion node.
- Compile and save the Blueprint.
- Play the map.
You will now see that 0.0 is displayed in the left of the screen.
When the player character moves the value will change.
The value changes quickly.
Full speed occurs above 600.
Short quick movements or build up to run occurs between 0 > 300ish
– TIP: Print Strings are very useful for many parts of Wwise data to confirm if the correct values are being passed out to Wwise correctly. For example: if we add a Print String to the Get Surface Type Function, the different Surface types being called by the game will then be displayed on screen.
In this step we add to the Wwise data we implemented in Chapter 04B.
Using a new Game Parameter we will control the volume of the player character footsteps and armour audio content via an RTPC.
- Navigate to the GameSyncs tab > Game Parameters > Default Work Unit.
Right click the Default Work Unit, then select: New Child > Game Parameter.
Name it: GP_Character_Speed
- Double click the game parameter to view its properties.
Under Range, add the following changes:
Change Max value to: 1000
Change Default value to: 0
Leave the Min Value as: 0
- Navigate to the Audio tab > CHA_FSP_Human Switch Container.
With the Switch Container selected in the RTPC tab, in the RTPC list select the first >> UI Button.
Then Select: Voice Volume
On the same entry line, select the new second >> UI button. Then select: Game Parameter > GP_Character_Speed.
- In the graph add the following updates to the red line.
Move the start marker point to: X = 0, Y = -8
Add a point marker on the red line then move it to: X = 75, Y = -8
Add a point marker on the red line then move it to: X = 600, Y = 0
– TIP: What these values do. If the Player characters Velocity speed is below 75 the footstep audio assets volume will be played at -8db of the General Settings tab Master Volume.
Then if the Player characters Velocity speed value is faster than 600, then there will be no volume DB reduction.
From Velocity speed 75 > 600, the volume will slowly increase depending on the Velocity Value Unreal passes to the Wwise Game Parameter.
- Now add the exact same RTPC settings to the CHA_ARM_Leather_Run_Fast Random Container that we implemented in Chapter 04A. (only if you choose to implement Armour movement Events to animation timelines e.g. the Run animation)
– TIP: With the armour set up using the player character Velocity Game Parameter values, the armour will also feel more naturally weighted when the player character moves.
- If you would also like to adjust either high or low EQ properties of the audio asset for the slowly speeds you can add the same above process, but instead of using RTPC Voice Volume, use either Voice High-Pass Filter or Voice Low-Pass Filter.
- Save the Wwise Project updates, then Generate the Wwise Sound Banks.
Unreal Anim BP
Next, we add further Blueprint nodes to the AnimBP, expanding on the pipeline we implemented in Chapter 04B, allowing for Player Character footstep Velocity control via the new Game Parameter RTPC we have implemented into Wwise.
- Open the AnimBP
- In the Event Graph tab, location the AnimNotify_Anim_SFX_CUS_FSP_Human Event Node.
Break the line that connects to the Get Surface Type node.
Then move the SFX Footstep AnimNotify Event comment box (and containing nodes) to the right so you have a space to add new Velocity updates.
- Right click the graph, then in the search box, type: Set RTPCValue
- In the Set RTPCValue node > RTPC box, add the new Wwise name of the new Game Parameter: GP_Character_Speed. The name must match the Wwise Game Parameter name exactly.
- Then connect the following nodes together:
> AnimNotify footstep Event node > Set RTPCValue node
> Set RTPCValue node > Get Surface Type node
> VectorLength Node > Set RTPCValue > Value Input.
- Mouse drag a box around the RTPC node, then press C on your keyboard
In the comments box type: SFX Character Speed – Footstep
- Compile & save the Blueprint.
- Generate the Unreal Sound Banks.
Then Import the Sound Bank updates.
We can now test the new RTPC updates in game.
- Load the map that you are working with.
- Connect Wwise to Unreal
- Then change to the Wwise Layout: Profiler.
Filter the Profiler log by the footstep content
- Solo the Associated footstep content in Wwise.
- Play the map.
Move the player character around the map.
Moving from Idle to full movement speed you should hear the armour and footstep audio content raise in volume. Also, as the character comes to a stop you should hear the associated audio content reduce in volume.
This gives a more natural weight of the associated audio content.
Try moving the player character short distances, the Velocity speed will not likely go above 300, so the volume will remain low, giving a sense of lighter weight.
- Make any balancing changes you wish to add.
- Stop the game, then Disconnect Wwise to Unreal
- Save the Wwise Project updates and Generate the Wwise Sound Banks.
- Lastly, Generate the UE4 Sound Banks.
This guide hopefully gives you an insight to how a basic RTPC can be implemented.