Created By: Game Audio Resource Ltd Date: 19/08/2019 Version: 2.00
In this guide we will implement a hierarchy that is generically the same for both the shotgun and the rifle.
For this guide we will focus on the rifle.
- STEP 01: Weapon Fire
- STEP 02: Weapon Reload
- STEP 03: Bullet Drop
- STEP 04: Test & Integrity Report
Task Time Needed: 2 hours
Chapter 11 A – Step 01
In this step we will set up for all content related to the weapon rifle.
- Navigate to the Project Explorer > Audio tab > Actor-Mixer Hierarchy > Weapons Wwise Work Unit.
Right Click then select New Child Actor Mixer.
Name it: Weapon_Rifle
- Select the Actor-Mixer, then in the Property Editor > Output Bus assign the Audio Bus to:
SFX > Weapon
- Right click the new Actor Mixer, then select New Child > Random Container.
Name it: Weapon_Rifle_Fire
- Drag in associated one-shot rifle fire audio assets into the new Random Container.
- Place them under the path: SFX > Weapons > Rifle
- Navigate to the Project Explorer > ShareSets tab > My Cube > Weapon Wwise Work Unit.
- Right Click the Wwise Work Unit, then select: New Child > Attenuation
Name it: Weapon_Fire
- Double click the new attenuation to open the properties.
Change the max Distance to 140
With the Output Bus Volume selected, in the graph add a point at:
Output Bus volume 0.0 and Distance 10
Then right click the red line after the new point, then select the Logarithmic (Base 3) curve
Select the Low-pass filter in the Curves list.
Then Change he curve column to Custom.
Move the point marker at Distance 140 to around Low-pass filter 50
Right click the Blue line, then select Exponential (Base 3) curve
- TIP: What this does is low pass (taking more of the high freq. off) the asset the further the camera is away from the source of the sound. In this case when the enemy entity Slith fires its rifle, if you are 100 in game metres away from the source. The sound will apply around 20 to low pass, giving an extra sense of distance.
- Close the Attenuation Editor Window
- Return to the Actor-Mixer Hierarchy > Weapon_Rifle_Fire Random Container.
Then in the Property Editor > Positioning tab:
Tick Override Parent
Under Listener Relative Routing > 3D Spatialization > in the drop-down menu select: Position + Orientation.
Under Attenuation assign the following path: My Cube > Weapon > Weapon_Fire
- Navigate to the Project Explorer > Events tab > Weapon Wwise Work Unit
Right Click, then select New Child > Virtual Folder
Name it: Weapon_Rifle
- In the Unused folder Locate the 2 following events:
Then move them into the new Weapon_Rifle Virtual Folder.
Select each of the events individually.
Then navigate back to the Actor-Mixer Hierarchy > Weapons_Rifle_Fire Random Container.
Then drag the Random Container onto Play Action line in each Event.
- Save your Wwise Project updates and Generate the sound banks
Chapter 11 A – Step 02
In this step we will highlight how to setup for a reload sound to trigger for the rifle
Note: The shotgun has unique separate events for the reloading pump action.
- Navigate to the Project Explorer > Audio tab > Actor-Mixer Hierarchy > Weapon Wwise Work Unit.
Right click the Actor Mixer Weapon Rifle, Select New Child > Random Container.
Name It: Weapon_Rifle_Reload
- Drag in associated one-shot rifle reload audio asset.
Place them under the path: SFX > Weapon > Rifle
As the Rifle reload is animated slightly to the right of the centre of the screen we will place the sound to trigger slightly right of the centre.
- TIP: As this will play only on the Player Character. We will not add a 3D attenuation and leave as a 2D positioned sound.
If you are working towards showcasing a multiple-player game. Add a new attenuation and assign to the Weapon_Rifle_Reload Random Container.
- Select the Weapon_Rifle_Reload Random Container, then in the Property Editor Positioning tab, add the following:
Tick Override parent
In the Speaker Panning Drop-down menu select: Fade-Balance.
Then click on the Edit button.
Move the listener position slightly to Right, then close the window.
Then under Attenuation, we will add a new attenuation for weapon detail.
Click the path button > New > Then navigate to the Weapon WWU and select it.
Then name the new attenuation Weapon_Detail_Player_Close.
Then click on the Edit button
Change the Max distance to 3
Add a point in the graph at Output Bus Volume 0.0 and Distance 2
Then right click the line between 2 > 3. Select the curve: Logarithmic (Base 3)
- Close the window.
- Navigate to the Project Explorer > Events tab.
Locate and select the event: Fire_Rifle_Player
- In the Event Editor, Right click the list, then select New Action > Play
- With the new play line selected. Change the Delay to 0.4
- TIP: This means when the Rifle fire event is called, the reload sounds will be called 0.4 of a second after the event is called (hopefully in time with the onscreen animation, if not adjust this Delay value to your liking)
- Navigate back to the Actor-Mixer Hierarchy > Weapon_Rifle_Reload Random Container.
Drag it on to the new sound event Play line we have just added.
- Test your update works, by selecting the event and pressing play on your keyboard.
- You should hear the rifle fire, then the reload sound.
- Save your Wwise Project updates and Generate the Sound Banks.
Chapter 11 A – Step 03
We will implement a single bullet drop with every rifle gun shot fire to the right of the camera focus / listener position.
NOTE: the bullet drop sounds will also be randomly heard at different positions on the right of the camera position.
- Navigate to the Project Explorer > Audio tab > Actor-Mixer Hierarchy > Weapons Wwise Work Unit
Right click the Weapon_Rifle Actor Mixer, then select New Child > Random Container
Name it: Weapon_Rifle_Bullet_Drop
- Drag in associated one-shot bullet drop audio assets into the Random Container.
Place them under the path SFX > Weapon > Rifle
- Navigate to the Project Explorer > ShareSets tab.
Right click the Weapons Wwise Work Unit, then select: New Child > Attenuation
Name It: Weapon_Bullet_Drop
- Open the new attenuation
Change the Max distance to 30
Select the Output Bus Volume. Then in the graph add a point at:
Output Bus Volume 0.0 and Distance 5
Right click the line after the point marker, then select the logarithmic (Base 3) curve.
Close the Attenuation Editor Window.
- Return to and select the Actor-Mixer Hierarchy > Weapon_Rifle_Bullet_Drop Random Container.
In the Property Editor > Positioning tab add the following:
Tick override parent
Under Listener Relative Routing > 3D Spatialization > Drop-down menu select: Position + Orientation.
Then under Attenuation assign the path: My Cube > Weapon > Weapon_Bullet_Drop
- Under 3D Position > drop-down menu, select Listener with Automation.
Then click the Automation… button.
Under Paths, click the New UI Button.
Name it: Position_01
Under Play Types select: Random
Tick the box: Pick new path when sound starts
Now select the Position_01 entry. Move the point in the speaker room to midway to the right front.
Copy the Position_01 and paste 2 versions of it into the Path list.
Individually select each of the new positions. Move the marker in the speaker window to different positions for each entry.
You can add further positions, if needed.
- Close the Position Editor Window.
- Navigate to the Project Explorer > Events tab
Locate and select the event Fire_Rifle_Player
- In the Event Editor list, right click, select New Action > Play
- Change the Delay value to 1
- Navigate back to the Actor-Mixer Hierarchy Weapon_Rifle_Drop Random Container.
Then drag it onto the new event Play Action we have just added.
Now select and play the event, you should now hear, the rifle fire, then reload, then bullet drop.
- Save your Wwise Project Updates and Generate the sound banks.
For the Shotgun Content:
At this point you could duplicate the entire Rifle hierarchy. Renaming the structure containers from Rifle to Shotgun.
Then add the shotgun assets that come with the default project or your own audio assets.
Chapter 11 A – Step 04
Test & Integrity Report
The final step will be to test the rifle & Shotgun content in-game.
- Boot up the Cube game and connect Wwise to the game.
- Solo the Actor-Mixer Hierarchy > Weapon_Rifle & Weapon_Shotgun Actor Mixer’s.
- Now change to the Wwise Profiler Layout.
- Click on Filter, then in the capture log window, add the following:
Tick Wwise Objects
Then assign the path: Actor-Mixer Hierarchy > Default Work Unit > Weapon
- Return to the game. In the default map collect some Rifle & shotgun ammo.
- Then simply change to the Rifle via your mouse wheel and fire the Rifle.
The test the shotgun.
- Boot up a single player game. Test that the shotgun & rifle works for the enemy entities Ratamahatta and Slith.
- Make any balancing changes or timing adjustments you wish to make.
Close the game.
- Save your Wwise Project updates and Generate the Sound Banks.
- Finally run a Wwise Integrity Report to validate your hierarchy data structure.