cancel
Showing results for 
Search instead for 
Did you mean: 

Acoustic Ray Tracing for Unity does not make any sound

maumau.tuna
Honored Guest
I should have done everything I should do, but my test project does not make any sound with Acoustic Ray Tracing of Meta XR Audio SDK. What are the likely solutions? The project makes sounds normally when I disable Acoustic Ray Tracing.
 
My environment
- Windows 11
- Unity 2022.3.36f1
- Visual Studio 2022
- My Unity project is a simple non-XR 3D maze
 
 
What I did:
(1) Installed Meta XR Audio SDK Plugin for Unity tarball into my Unity project, following "Method 2: Download via the Meta Quest Developer Center" in [1].
 
(2) Set up my Unity project to enable Meta XR Audio SDK, following "Unity Project Setup" in [1]. The project settings is [2].
 
(3) The sounds are imported into Unity by forcing them to mono [3].
 
(4) Enable spatialization on my AudioSource components as per "Implementation" in [4]. The resulting setting is [5]. Attached the script MetaXRAudioSource.cs to the Audio Source’s GameObject. The optional MetaXRAudioSourceExperimentalFeatures.cs is not attached.
 
(5) Attached the sample SpatializerMixer, which is included in Meta XR Audio SDK, to the output of AudioSource components, following "Setup the Audio Mixer" in [6]. The resulting setting is [5].
 
(6) Added Acoustic Geometry as per [7]. Specifically, attached an MetaXRAcousticGeometry component to the parent GameObject that have various geometries like walls, floor, and ceiling as its children. "Include Child Meshes" is enabled. The resulting setting is [8].
Then baked the acoustic geometry. The baked data is generated in the file StreamingAssets/Acoustics/<scene name>/<parent GameObject name>.xrageo.
 
(7) Added a new GameObject and attached the MetaXRAcousticMap component to it, as per [9]. The resulting setting is [10].
Then baked the acoustic map. The Unity Editor's Inspector shows the acoustic map as READY. The baked data is generated in the file StreamingAssets/Acoustics/<scene name>.xramap.
 
(8) Played the scene in the Unity Editor, but I can hear no sound from spatialized audio. On the other hand, non-spatialized audio make sounds.
However, the Unity console shows that the acoustic geometry and map are loaded successfully as follows:
 
Found data in default location: StreamingAssets/Acoustics/Level 1.xramap
...
Applying Acoustic Propagation Settings: [acoustic model = Automatic], [diffraction = True], 
...
Setting spatial voice limit: 64
...
Loading Geometry Maze1 from StreamingAssets C:/Unity/projects/amaze3d/Assets/StreamingAssets/Acoustics\Level 1\Maze1.xrageo
...
No Meta XR Audio Room found, setting default room
...
Fallback handler could not load library C:/Program Files/Unity/Hub/Editor/2022.3.36f1/Editor/Data/MonoBleedingEdge/lib/MetaXRAudioWwise
...
Fallback handler could not load library C:/Program Files/Unity/Hub/Editor/2022.3.36f1/Editor/Data/MonoBleedingEdge/lib/libMetaXRAudioFMOD
Meta XR Audio Native Interface initialized with Unity plugin
...
Geometry Maze1, read time = 0.02320397
...
Sucessfully loaded Geometry Maze1, load time = 0.06603026
...
Simplified mesh with 3563 vertices
...
 
 
 
References
[1] 
Meta XR Audio SDK Plugin for Unity - Requirements and Setup
 
[2] ProjectSettings/AudioManager.asset
...
  m_Volume: 1
  Rolloff Scale: 1
  Doppler Factor: 1
  Default Speaker Mode: 2
  m_SampleRate: 0
  m_DSPBufferSize: 256
  m_VirtualVoiceCount: 512
  m_RealVoiceCount: 32
  m_EnableOutputSuspension: 1
  m_SpatializerPlugin: Meta XR Audio
  m_AmbisonicDecoderPlugin: Meta XR Audio
  m_DisableAudio: 0
  m_VirtualizeEffects: 1
  m_RequestedDSPBufferSize: 256
 
[3]
<sound file name>.mp3.meta
...
  forceToMono: 1
...
  ambisonic: 0
  3D: 1
...
 
[4]
Apply Spatialization in Unity
 
[5]
FPSController.prefab
...
--- !u!82 &8200000
AudioSource:
...
  m_Enabled: 1
  serializedVersion: 4
  m_PlayOnAwake: 1
  m_Volume: 1
  m_Pitch: 1
  Loop: 0
  Mute: 0
  Spatialize: 1
  SpatializePostEffects: 0
  Priority: 128
  DopplerLevel: 0
  MinDistance: 1
  MaxDistance: 100
  Pan2D: 0
  rolloffMode: 2
  BypassEffects: 0
  BypassListenerEffects: 0
  BypassReverbZones: 0
...
--- !u!114 &8500000
MonoBehaviour:
...
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: a07f270ac36c49789466c75ceb88424c, type: 3}
...
  enableSpatialization: 1
  gainBoostDb: 10
  enableAcoustics: 1
  reverbSendDb: 0
 
[6]
Apply Room Acoustics in Unity
 
[7]
Acoustic Geometry in Acoustic Ray Tracing for Unity
 
[8]
Level1.unity
...
--- !u!114 &2007814857
MonoBehaviour:
...
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: 46bc5ac24d7ec0348bb607bf4ed1f00d, type: 3}
...
  IncludeChildMeshes: 1
  relativeFilePath: StreamingAssets/Acoustics/Level 1/Maze1.xrageo
 
[9]
Acoustic Maps in Acoustic Ray Tracing for Unity
 
[10]
Level1.unity
...
--- !u!1 &2008814857
GameObject:
  m_ObjectHideFlags: 0
...
  m_Component:
  - component: {fileID: 2008814859}
  - component: {fileID: 2008814858}
  m_Layer: 0
  m_Name: Test Acoustic Map
  m_TagString: Untagged
...
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!4 &2008814859
Transform:
  m_ObjectHideFlags: 0
...
  m_GameObject: {fileID: 2008814857}
  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  m_LocalPosition: {x: 0, y: 0, z: 0}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_ConstrainProportionsScale: 0
  m_Children: []
  m_Father: {fileID: 0}
  m_RootOrder: 0
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2008814858
MonoBehaviour:
  m_ObjectHideFlags: 0
...
  m_GameObject: {fileID: 2008814857}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: a96b764f28a53ab488bd80d19c0c167a, type: 3}
...
 
0 REPLIES 0