Created By: Game Audio Resource Ltd Date: 09/11/2019 Version: 1.00
Wwise UE4: Chapter 04 E – Character:
Body Land – Speed
In this guide we expand on the Body Land pipeline we implemented in Chapter 04D.
We verify the speed of the character so we can implement a fake falling distance via Velocity values to determine either a heavy or a light impact landing.
- STEP 01: Getting Velocity Speed
- STEP 02: Wwise Hierarchy
- STEP 03: 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 lands.
- Open the AnimBP
- In the Event Graph,
Remove any previous Print String nodes you are using to track output values.
- 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.
On the Left side of the screen the values show the speed that the player character is moving at.
Perform a standing jump on the spot.
The value changes quickly, but we can see the value range goes up to around 350
Then order the player character to jump off the house first-floor balcony.
We can see a greater value is displayed the longer the player character falls ending up to around 350 > 1000.
We will set up the Wwise data slightly differently to the Footstep speed RTPC mentioned in Chapter 04C, allowing us to make use of Blend Containers. This will enable implementation of different weighted audio assets. Light & Heavy Body Land impact.
Note, we make use of the GP_Character_Speed RTPC we set up in Chapter 04C
- Navigate to the Audio tab > CHA_BDY_Land_Human Switch Container.
- First, we modify the Grass Random Container.
Rename the Random Container to: Grass_Heavy
Copy & Paste the Random Container.
Then rename the 2nd Random Container to: Grass_Light.
- Drag in new audio assets if needed. Or simply high pass the audio assets so the heavy weight low frequencies are reduced under the light Random Container
For example for the light Random Containers, we set High Pass as: 25 & Volume: -4
- Select Both Grass Random Containers, right click, then Select: New Parent > Blend Container.
Name it: Grass
- Select the Blend Container, then in the General Settings tab > Blend Tracks, click on the Edit… UI Button
- In the Blend Container Editor click the, New Blend Track UI Button.
Name it: Character Body Land Speed.
Close the Blend Track Window
- In the Contents Editor, drag the Light, then Heavy Random Containers onto the Blend Tracks list.
- Open the Blend Track Editor again
Tick the Crossfade Box.
Click the >> UI Button, then select > Game Parameter > GP_Character_Speed
- Adjust the values start and end points for when the content will change based on the player characters speed.
Reminder: 0 > 350ish = standing on the spot jumps.
anything above 350ish = first-floor jump height landings
Close the Blend Track Editor window
- Now modify all other Surface Type Random Containers to have the same hierarchy as the Grass Blend Container.
- Once all Blend Containers are implemented, select the Switch Container. Then in the Content Editor, assign all the Blend Tracks to the different Surface Types.
- Select the Parent CHA_Body Actor Mixer.
Then in the Advanced Settings tab, change the Limit Sound Instances to value 2.
– TIP: As 2 assets are called when the body land Event is called, we have to set the value to 2.
This means we introduce a bug will addressed in Chapter 04A. you may now hear 2 body land events play randomly when the player character lands from a jump.
Again, as we mentioned for the jump vocal, you could edit the body land assets in you preferred DAW of choice, so your assets are around 1 second long. With the limitation set at 2, this hopefully should reduce the chance of the body land assets being triggered twice.
- Save The Wwise Project updates, then Generate the Sound Banks.
Next, we add further Blueprint nodes to the AnimBP, expanding on the pipeline we implemented in Chapter 04D, allowing for Player Character body height land Velocity control via the new Game Parameter RTPC we have implemented into Wwise Blend Tracks.
- Open the AnimBP
- In the Event Graph tab, location the AnimNotify_Anim_SFX_CUS_BDY_Land Event Node.
Break the line that connects Event node to the Get Surface Type node.
Then move the SFX Body land 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 body land 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 – Body
- Compile & save the Blueprint.
- Generate the Unreal Sound Banks.
Then Import the Sound Bank updates.
We can now test the updates in game.
- Load the map, that you are working on.
- Connect Wwise to UE4,
- Then change to the Wwise Layout: Profiler.
Filter the Profiler log by the body content
- Solo the Associated body content in Wwise
- Then click Play
- Make the Player Character perform jumps from various heights.
g. on the base floor, then from the first-floor balcony.
You should hear different weighted landing audio asserts depending on the height from which the player character has jumped from.
- Make any balancing changes you wish to add.
- Disconnect Wwise to Unreal
- Save the Wwise Project updates and Generate the Wwise Sound Banks.
- Lastly, Generate the UE4 Sound Banks.
The Wwise Process used in this guide using Blend Containers could also be used for Footstep speed, allowing for different sets of footstep audio assets to be used. e.g. Walk and Run, instead of using the same asset based on a single Parent RTPC volume value