|
Note:
A map with the parameters for all tutorials is available as part of the Unreal Demo Game available from the Audiokinetic Launcher. You can skip this section if you want to follow along with that map. It is called SpatialAudioTutorialMap. |
Create a New Project
Follow the steps below (based on the use of Wwise 2019.2 and Unreal 4.24), in order to build your working environment.
- Launch Unreal from the Epic launcher.
- Create a new Unreal Project C++ Blank project (without starter content).
- Close Unreal.
- Start the Audiokinetic Launcher.
- Install Wwise.
- Select the Unreal Engine tab.
- Click the Integrate Wwise into Project... button.
- Launch Wwise using the Open in Wwise button.
- Launch Unreal using the Open in Unreal button.
Wwise Project Preparation
For the tutorial, you will need a Sound SFX and an Event to play it.
- In the Wwise project, create a new Sound SFX in the Default Work Unit of the Actor-Mixer Hierarchy and import a sound.
-
Make sure to enable Use game-defined auxiliary sends in the General Settings tab.
Create Sound SFX
-
In the Positioning tab, enable Listener Relative Routing, set 3D Spatialization to Position + Orientation and add an Attenuation with a Max distance of 5000.
Set 3D Spatialization to Position + Orientation
-
Right-click on the Sound SFX within the Actor-Mixer Hierarchy, then select New Event > Play.
Create sound Event
- Save the project.
Unreal Project Preparation
- Create a floor, a building with two rooms and an obstacle outside using your preferred method. In the SpatialAudioTutorialMap, we used a custom mesh for the building and a basic cube static mesh component for the obstacle outside.
- Place emitters in the scene:
-
Drag the Event created in the previous section from the Waapi Picker to the Content Browser.
Drag from Wwise Picker to the Content Browser
-
Double-click the Event in the Content Browser and create a new SoundBank directly from the SoundBank list.
Create SoundBank
Select SoundBank
- Drag the Event into the scene to create new
AkAmbientSound
actors.
- Place one of them outside and one in each room.
SpatialAudioTutorialMap
- Open the Level Blueprint from the Blueprints menu and remove "Event BeginPlay" and "Event Tick".
- Trigger events with user input.
- Drag a newly created AkAmbientSound from the World Outliner into the blueprint.
- Find the "Post Associated Ak Event" function from the AkAmbientSound node.
- Right-click the blueprint background and search for "Left Mouse Button".
- Connect the Pressed outlet to the "Post Associated Ak Event" Exec.
-
Repeat the same steps for all the AkAmbientSound items.
Add user input to trigger ambient sound
- Save and close the Level Blueprint.
Verify your Setup
-
In the upper menu, select Build > Generate SoundBanks.... to generate the SoundBanks for Windows.
- Make sure the banks are successfully generated in the Output Log.
Generate SoundBanks from build menu
- Start the scene. When pressing the respective buttons, you should now hear the sounds play, spatialized in 3D.
-
Connect to Wwise Authoring and open the Profiler layout (shortcut F6).
- When playing a sound in the scene, you should see a graph similar to the following one.
Outside button Voices Graph