Develop
Develop
Select your platform

Getting Started with Acoustic Ray Tracing for Unity

Getting started

This section will describe the general steps for setting up Acoustic Ray Tracing. To learn all of the technical details of the library, see the API reference for each component after reading this section.
By the end of this document, you’ll be able to:
  • Setup your project to use Acoustic Ray Tracing.
  • Understand the general steps to hear the rendered acoustics.
  • Understand the general steps to adjust the automatically generated acoustics.

Prerequisites

Unity Native

Acoustic Ray Tracing is a new feature set within the existing Meta XR Audio SDK. These features are automatically available when you install the Meta XR Audio SDK through the instructions per platform below:

Unity with Middleware (FMOD or Wwise)

First install the Meta XR Audio SDK following the instructions for your platform:
Once this is complete, you will find a new file inside the Unity folder called MetaXRAcousticsSDK.tgz. Follow Unity’s instructions to install the tarball file from the download.

Project Setup

Check your spatial audio sources

  1. Check you have a spatial audio source with Enable Acoustics as described by your platform: unity Native, unity and FMOD, unity and Wwise
  2. Check your audio source is passing through the Reverb plugin as described by your platform: unity Native, unity and FMOD, unity and Wwise

Implementation

Creating acoustics

  1. Create an empty game object in the scene and add a MetaXRAcousticGeometry component to it. This is the parent object.
  2. Make sure Include Child Meshes in this component is checked.
  3. Create geometry in the scene using a static mesh (for example, a .fbx file), or 3D objects such as cubes, and attach them as child objects. As a simple example, create a floor, four walls, and a ceiling.
  4. Create a new empty object and add a MetaXRAcousticMap component to it. Ensure the transform of this object has no Scale on its transform.
  5. Click Bake Acoustics on the MetaXRAcousticMap component. By default, this will also bake the Acoustic Geometry. Line gizmos will appear to show the acoustic mesh outline and Sphere gizmos will appear to show the acoustic precompute points in the acoustic map.
  6. Each time any part of your game mesh object changes, click Bake Acoustics again on the acoustic mesh to keep it current with the latest geometry in the scene.
  7. Press play to hear acoustics audio.

Make adjustments to the acoustics

Acoustic Ray Tracing will automatically analyze your game mesh and generate a default acoustic scene. If you wish to further tune the results, there are two methods to fine-tune the Reverb Level and RT60 of a given region of the game: Acoustic Materials and Acoustic Control Zones.

Version control integration

The Meta XR Audio SDK implements some of unity’s built in version control functionality. If your project has source control setup and active, all Acoustic Geometry and Acoustic Map components will automatically check out their generated files after a new computation is completed.

Next Up

Learn all of the specific technical details about each component related to Acoustic Ray Tracing starting with the geometry component
Did you find this page helpful?
Thumbs up icon
Thumbs down icon