Focus Point

In third-person games, the camera and player character are typically located at different positions. This can cause some challenges for audio spatialization, as we carefully consider where to place the listener. When it is on the camera, even if the character is close to a sound source, distance attenuation will be applied. On the other hand, if the listener follows the character, a sound source could be heard as coming from the wrong direction when the character’s position changes. The Focus Point feature solves these issues.

Introduction

A Focus Point allows for extended control of the listening point, making it possible to separately adjust the distance and the direction from the sound source to the listener.

By inserting a Focus Point in addition to the listener, the origin point from which the distance from and the direction of the sound source are calculated can be set to any position between the listener and the focus point.

For example, when placing the Focus Point at the character position and the listener at the camera position, the attenuation will be determined based on distance between the sound source and the character, but the direction of the sound source will be based on the angle in relation to the camera.

01 Focus Point

Since the attenuation changes according to the distance to the character, it is easier for the user to grasp the distance between the character and the sound source. At the same time, the direction of the sound source matches the camera’s angle of view, which helps the player to pinpoint the direction in which the object is located in the level.

Unreal Engine

The Criware Unreal Engine Plugin provides several ways to easily set the Focus Point (please note that in the Plugin, the listener position is set by default to the camera position.)

First, the Atom Listener Focus Point component can be used:

  • Select the character with the camera component attached
  • In the details window click Add Component
  • Search and select Atom Listener Focus Point

The Focus Point will be created at the character position. Two parameters can be set directly in the component:

• Distance Focus Level

This parameter controls the position used as the origin point when calculating the distance to the sound source.

If the Distance Focus Level is set to 0, the distance to the sound source is calculated from the camera.

If the Distance Focus Level is set to 1, the distance to the sound source is calculated from the position of the Focus Point (the character in our case).

• Direction Focus Level

This second parameter controls the position used as the origin point when determining the direction of the sound source.

If the Direction Focus Level is set to 0, the direction of the sound source is calculated from the camera.

If the Direction Focus Level is set to 1, the direction of the sound source is calculated from the position of the Focus Point.

By default, the Distance Focus Level is 1 (i.e., on the character) and the Direction Focus Level is 0 (i.e., on the camera). It is possible to adjust these values depending on the distance and the angle between the character and the camera. For instance, a slight decrease in the Distance Focus Level will allow the camera to affect the distance attenuation to some extent, which may feel more natural for the player as he moves the camera around the character.

02 UE4 Component

In addition to this method, the Criware Unreal Engine Plugin provides several Blueprint nodes to set the Focus Point. If your project includes in-game cinematics, being able to set the Focus Point dynamically in a Blueprint is primordial to avoid spatialization issues. Indeed, it is probably a good idea to avoid having the Focus Point on the character during a cinematic sequence, as he or she may get off-screen and adversely affect the distance calculation of the sound sources.

03 UE4 Blueprint

Unity

In Unity, the Focus Point has to be set programmatically. Use the CriAtomEx3dListener SetFocusPoint function to place the focus point, then call the CriAtomEx3dListener’s SetDistanceFocusLevel and SetDirectionFocusLevel functions to set the origin point for the distance and direction calculations, similarly to what was described in the Unreal Engine section above.

 

Make sure to check the Focus Point feature when developing your next third-person game as it can help you improve the audio spatialization, and therefore the general sense of immersion.

Leave a Reply

Your email address will not be published. Required fields are marked *