ValveSoftware / steam-audio

Steam Audio
https://valvesoftware.github.io/steam-audio/
Apache License 2.0
2.2k stars 152 forks source link

[FMOD] No sound in FMOD Studio or game when enabling occulusion with "simulation-defined" option #328

Closed tenyuhuang closed 3 months ago

tenyuhuang commented 3 months ago

System Information Please provide the following information about your system:

Issue Description Setting up any audio event with Steam Audio Spatializer and occlusion enabled in "simulation-defined" mode will result in total silence, whether in FMOD Studio or in-game.

To begin with, this is already a hassle when editing the audio event itself - it doesn't matter if there is an actual simulation set-up on the game engine side, even if this is intended (i.e. no sound if no simulation data) it makes no sense at all.

Under this situation, if any editing on events are to be actually done, one have to manually disable occlusion or the whole spatializer and re-enable it afterwards - it's okay during testing or going with a few events, but in our past projects there are literally a few hundred Ks of events to process through. Despite an option for batch operation, it is known to be inconsistent and as a result potentially troublesome for a larger project.

Then I decided to move on and see if I could make it work with an actual simulation anyway. So I followed current documentations, set up Unreal Engine with Steam Audio and Steam Audio FMOD Support, made a small test map, tagged the geometry with Steam Audio Geometry component and corresponding materials, generated static mesh and probes...to no avail. The audio event is still completely silent with simulation-defined occlusion. Air Absorption doesn't seem to work at all either.

As of now I have a few educated guesses: (a) the intended default behaviour of occlusion module is definitely less favorable than desired; (b) the occlusion module for fmod is probably "broken"; (c) there is something missing or I definitely failed to follow in the docs.

Any guidance or insights into the issue would be greatly appreciated!

Steps To Reproduce Steps to reproduce the behavior:

  1. Set up Steam Audio with FMOD and Unreal Engine with current official docs;
  2. Create a new audio event in FMOD and replace the default spatializer with Steam Audio Spatializer;
  3. Enable Occlusion with "Simulation-defined" option;
  4. Create a test map in Unreal, tag the geometry with Steam Audio Geometry component, generate Steam Audio Static Mesh and probes;
  5. Drop forementioned audio event into the map.

The audio event is supposed to play with sound after either step 3 or 5, but the end result is total silence; disabling Occlusion or set it to "User-Defined" will result in a normal playback instead.

lakulish commented 3 months ago

@tenyuhuang Can you confirm whether you have correctly configured FMOD Studio and Steam Audio to work with each other within Unreal Engine? To check, in your Unreal project:

Note that the fact that simulation-defined occlusion doesn't appear to work as expected in the FMOD Studio standalone editor is separate issue (which we can reproduce).

Thanks!

tenyuhuang commented 3 months ago

Replying to https://github.com/ValveSoftware/steam-audio/issues/328#issuecomment-2000437146

Yes, I can confirm I have already done all the prerequisite steps above.

There doesn't seem to much in the logs either. Is there any way I could generate some verbose log and see what could have possibly gone wrong?

lakulish commented 3 months ago

@tenyuhuang Would it be possible for you to share minimal Unreal Engine and FMOD projects that reproduce the issue? I tried creating a minimal project but was unable to reproduce the issue from within Unreal Engine, so maybe there is something different between your project and mine. Thanks!

tenyuhuang commented 3 months ago

@lakulish Hi, thanks for checking stuffs on your side! I checked with the team earlier and it seems like we have some non-standard implementations in the engine, which may or may not have something to do with the issue. So until we figure something out and isolate the problem, maybe it's better I close the issue for the time being. My apologies!