Table of Contents
What happens for sounds that aren’t associated with an actual game object, such as the gems falling on the ground that you added in Lesson 2? When a gem falls from the Wwizard's staff, you can assume it falls on the ground in front of the Wwizard and breaks. To create a sense of realism, you want the listener to hear the gem land a meter or so away, sometimes a bit to the left, sometimes a bit to the right. Because there is no gem game object, there’s no coordinate information that Wwise can use to try and position the gem sound in the 3D world as you did in the last exercise. Fortunately, with Wwise, you can essentially simulate placing a sound object from Wwise into the 3D world, even when the game itself does not have a game object for that sound. This is accomplished with 3D Position Automation.
First, you need to configure the gem sounds so that 3D Spatialization can be applied to them. This is done in the same way you did it for the teleporter.
-
In the Project Explorer's Audio tab, choose the Gem Drop Sequence Container, and in the Property Editor, select the Positioning tab. Set the 3D Spatialization property to Position + Orientation and choose the Object_Attenuation ShareSet in the Attenuation group.
You don't need to click the Edit button in the Attenuation group as you did in the last exercise. This is because all of the distance attenuation settings you configured for the teleporter are now automatically applied to the Gem Drop object because they both reference the same Object_Attenuation ShareSet. You only need to define where you want the gem drop sounds to reside in the 3D world relative to the position of the listener. This is done using the Position Editor.
-
In the 3D Position group, choose Listener with Automation, and then click the Automation button.
The Position Editor window opens. This editor is a very powerful and feature-rich tool that facilitates creating highly customized, dynamic movements of sounds in a 3D space, without requiring any additional interaction with the game programmers. It’s a fantastic tool for creating ambient spaces where birds fly overhead, or the creaks and groans of an old building. You’ll use the Position Editor to make the gem drop sounds sound more believable by adding positional changes to the gem sounds as they bounce across the ground.
The Position Editor accomplishes the dynamic movement of a sound source by using paths, which are user-defined trajectories for a sound object to follow.
-
In the Paths group, click New.
A dot appears in the graph view indicating where the sound will come from as it relates to the listener’s position, which is represented by the center of the square. Since gems aren't going to initially drop very far away from the Wwizard, drag the default point's position closer to the center.
-
Drag the control point down.
After the initial impact sound, the gem breaks apart and the sounds of the fragments may be heard in a slightly different position as they bounce on the ground. You can add additional points to create a path that the gem drop sounds will follow by double-clicking in the graph view.
-
Create additional control points and drag them to slightly different positions.
The dots are connected with a line, showing the path that they will follow in 3D space.
You may have also noticed that at the bottom of the Position Editor, there is a timeline, and every time you added a point in the graph view, a corresponding point was created on the timeline. The timeline indicates how long it takes for the virtual object in the game to move from point to point to point. The gem drop sounds only last for a few seconds when they fall, so you can adjust the length of the overall timeline to more closely match the length of time that you’ll actually hear the gem sounds.
-
Click the Configure Timeline button and change the Length property to 2 seconds. Click OK.
In the real world, gems won’t always follow the same physical path when they're dropped, so to further increase the sense of realism, you can create multiple paths, with each drop of a gem using a different path.
Instead of creating a new path from scratch, you’ll copy your existing path multiple times, and then go back and modify these paths to create a variety of trajectories for the gem drop sounds to travel along.
-
With the Gem Drop_Path selected, right-click and choose Copy to Clipboard.
You can also select the path in the Paths list and press Ctrl+C to copy it.
The current path is copied to the clipboard.
-
Press Ctrl+V six times to create six new paths.
-
Select a path and alter the position of the dots. Repeat until none are identical.
You’re almost ready to go. You just need to make a couple of adjustments. First, you need to indicate that you want to randomly choose any of the paths each time a gem falls to the ground.
-
Click the Random option.
Now, each time a gem drop sound is played, the sound will bounce along one of the randomly selected paths you've created.
-
In the Play Mode area, select Continuous.
-
Play the Gem Drop Sequence Container to hear the result of your work, then close the Position Editor.