ADXTutorials

ADX Beginner’s Guide #8 – Spatialization Basics

In the last episode of this beginner’s guide, we learned how to use AISAC to create sounds that react to game parameters. This time, we will examine the difference between 2D and 3D sounds, and how to use basic spatialization features in ADX, and we will circle back to AISAC in the next post.

Spatialization also depends on the Speaker Settings in the Target Configuration, so we recommend reading our previous blog on how to set your speaker configuration.

2D Sounds

In a game, 2D sounds refer to sounds that are not located in a three-dimensional space. They do not change based on the player’s position or orientation in the game world, and are played directly to the output channels, based on their channel configuration.

For example, a 2-channel sound will be sent directly to the left and right speakers, while a 4-channel sound will be played by the left, right, left surround, and right surround speakers. Still, 2D sounds can be routed to a specific output channel using traditional panning: you can play a mono sound in either the left, right, or both left and right speakers, or change the balance of a 2-channel sound between the left and right speakers.

2D sounds are usually used for non-diegetic sounds such as music, narration, or UI, as these elements are not linked to actual objects in the game world. Background ambience sounds (usually 4 or 5-channel sounds) are also often set to 2D because they don’t necessarily need to change based on the player’s position.

Here is how to set a Cue in 2D with Atom Craft:

  • Select the Cue.
  • In the Inspector, change the Pan Type property to Pan.
  • When using this Pan Type, the properties under the Pan section can be changed:
    • Pan Angle: the angle at which the Cue will play in the speaker array. The speakers are distributed at specific angles based on the Target Configuration.
    • Pan Angle Random: it is the randomization of Pan Angle when the Cue is played.
    • Pan Interior Distance: it specifies how the sound is spread across the speakers. A value of 0 will cause the sound to be played on all speakers, while a value of 1 causes the sound to be played on only the speakers that correspond to the specified Pan Angle.
    • Pan Interior Distance Random: it is the randomization of the spread when the Cue is played.

01 2D Pan Settings

You can listen to how these parameters affect the sound in the following video:

3D Positioning

Unlike 2D sounds, 3D sounds are spatialized sounds that can be precisely located in a three-dimensional space. This means sounds can come to a listener from any direction – front, back, left, right, above, or below.

As the player changes their position or orientation, the spatialization updates the sounds accordingly. Indeed, the sounds are attenuated based on the distance between the listener (a virtual microphone often located on the character or the camera) and the emitters (the 3D sound sources), thus mimicking real-world acoustics.

In this diagram, the Listener at T0 can hear Emitters A and B, but not Emitter C. As he moves towards Emitter C, the sounds of Emitters A and B gradually fade out. At position T1, only Emitter C can be heard.

02 3D Sounds Diagram

3D sounds require more configuration to work properly. A 3D sound must have a minimum and a maximum distances between which volume attenuation will be applied. Optionally, it is also possible to set an attenuation angle to create a directional sound source. For instance, we could add more attenuation if the listener is located behind the emitter.

  • To register the Cue as a 3D sound, set its Pan Type property to 3D Positioning.
  • In the 3D Positioning section of the Inspector, you can now edit the following properties:
    • Min Distance of 3D Positioning Attenuation: it is the distance under which there is no volume attenuation.
    • Max Distance of 3D Positioning Attenuation: it is the distance over which there is no more attenuation.
    • 3D Positioning Inside Angle: it is the angle at which the sound source is attenuated.
    • 3D Positioning Outside Angle: it is the angle at which the sound source is fully attenuated (i.e., it is not heard beyond the outside angle).

03 Simple 3D positioning

Once these four properties are set, the sounds will be spatialized when placed in a game scene. However, only the volume of the Cue is attenuated by the distance and direction of the sound.

Here is how it sounds using our previous example:

As for 2D sound, the position of a 3D sound can be randomized by setting the Random Sound Source Shape property. This tutorial we previously published offers an example of implementation.

For moving 3D sources, using the 3D Positioning Dosppler Coefficient can also help emphasize the motion of an object. Here is another tutorial that showcases the Doppler effect feature.

We will build on this in our next beginner’s post in which we will use the 3D information sent by the game engine to control AISACs in order to create natural attenuations.