Acoustic Geometry in Acoustic Ray Tracing for Unreal
Updated: Mar 20, 2025
Meta XR Acoustic Geometry is a component that analyzes an in-game mesh to produce an Acoustic mesh, which informs the audio engine about the space. The first step in using Acoustic Ray Tracing is to always add the Meta XR Acoustic Geometry to the in-game geometry.
Meta XR Acoustic Geometry is a component that should be attached to a object in your game with some type of geometry attached to it (for example, a static mesh). The geometry component will perform analysis on the in-game geometry in order to generate a “.xrageo” file. This file represents a simplified version of the in-game geometry, with all the information relevant to the acoustics of the space. This also allows certain time consuming operations to be done to the mesh before it is used for acoustic rendering without slowing down the loading of the game.
After attaching the component to the geometry, you should perform precomputation of the “.xrageo” file by clicking the Bake Mesh button on the component. It will automatically generate a file path in the Contents directory based on the name of the game object and the scene. You can modify the file path in Advanced Controls. In order for geometry to work at runtime in the game, you must bake the acoustic geometry to an asset file stored somewhere in the Contents directory. This is necessary because Unreal does not allow reading mesh data at runtime.
There is an Include Child Meshes control. If you add your geometry component to a parent of individual geometry pieces, the script can automatically scan all of the children for you. This is useful, as you only have to place a single geometry component instead of adding one for every single element of your game. Note that the purpose of this feature is to streamline the usage of the component. There won’t be significant performance impacts compared to adding one Geometry per mesh in terms of Meta XR Audio resources. However additional actor components in a level will have a performance hit in unreal.
The geometry must be re-baked if you make changes to it or its children, including material information. Once baked, the material information is stored in the acoustic geometry file (.xrageo).
Important: If you do not tag any geometry, you may end up hearing the
Shoebox Room as a fallback. If you tag the geometry, but do not prebake an acoustic map, you may not get any reverb. The fallback behavior can be set in
Project Settings > Meta XR Acoustics.
| Parameter | Description |
|---|
Include Child Meshes | This button chooses whether or not child meshes of the GameObject where the geometry script is attached are included in the acoustic geometry. This option can be used to automatically combine all meshes within an object hierarchy into a single optimized acoustic geometry, which will be faster for ray tracing and produce better quality diffraction than many smaller meshes. This is typically used for the static meshes in a scene. |
Bake Mesh | This button will trigger the precomputation of the acoustic geometry with the given settings. |
Max Error | The maximum allowed error for the automatic acoustic geometry simplification. This control specifies an error threshold in meters (regardless of which units the game engine uses). A relatively large error threshold can be used to reduce the geometry complexity (memory size and runtime ray tracing cost). The default error threshold is 0.1, in other words, 10 cm. The threshold may be increased further (up to around 0.5 meters) without any problems in most cases. This control has no effect if the Enable Mesh Simplification button is not enabled. |
LOD | The Level of Detail to use for acoustics, the higher the LOD the less polygons. Typically the highest LOD will be sufficient and the most efficient. |
File Path | The path to the serialized acoustic geometry file, relative to the Contents directory. |
You may have certain subcomponents of your geometry which are not acoustically relevant and add to the file size without contributing audible value. To not bake these parts into the acoustic geometry, you can go to Edit > Project Settings > Meta XR Acoustic to apply tags to those pieces you want to exclude. Exclude tags only check against Actor tags and not Component tags.
The acoustic simulation can support geometry with holes (it does not require a watertight mesh). Expect acoustic energy to escape through the holes or open areas. For example, a largely open space, like an outdoor area, will be less reverberant than an enclosed space. The reverb will also be directional, such that it tends to come from the solid surfaces. If you have a wall to your left and open sky to the right, the reverb will be localized mostly on the left. Generally, this sounds good compared to other acoustic solutions, since it models the important features of outdoor acoustics (low reverb level, changes to reverb/reflection directivity).
Notes on Unreal components
Instanced Static Mesh components and Hierarchical Instanced Static Mesh components are supported and function the same way as regular Static Mesh components.
In order to apply a UMetaXRAcousticMaterial component to an Instanced Static Mesh, add the UMetaXRAcousticMaterial to the actor that has the Instanced Static Mesh Component. All instances will have the same Acoustic Material applied to it. It is not possible to apply different materials to different instances within the same Instanced Static Mesh component.
To use acoustic geometry and acoustic materials in a Level Instance, setup the level that the Level instances are pointing to.
1) Create a parent actor with an Acoustic Geometry component inside the level (You cannot edit anything inside a Level Instance).
2) Setup the static meshes under to be children of that actor.
3) Press “Bake” on the Acoustic Geometry component. (the Acoustic Geometry component will not bake child Level instances, you must go to the level itself to bake them)
4) The Acoustic Geometry will now automatically be setup for any scene containing the Level Instances.
You do NOT need to rebake an Acoustic Geometry if you move Level instances, BUT you will need to rebake the Acoustic Map component associated with it.
Packed Level instances are supported and function the same way as Instanced Static Mesh components.
If an Acoustic Geometry component has any child Packed Level Blueprints and its “Include Children” property is enabled, any static meshes of the Packed Level Blueprint will be baked into the acoustic mesh.