Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

3D Bus in Unity

+2 votes

I'm not sure if this feature is deprecated, but I attempted to implement the 3D bus architecture in Unity (outlined in this blog post -- https://blog.audiokinetic.com/working-with-the-new-3d-bus-architecture-in-wwise-2017.1-simulating-an-audio-surveillance-system/ and documented in this help article -- https://www.audiokinetic.com/library/edge/?source=Help&id=applying_positioning_to_busses ), and am having a few issues:

First, there's no documented way to attach a Bus to a Unity game object. AkEnvironment components take an Aux bus as a reference (which makes sense, because these are used for environmental effects that act as sends), but there's no component with a Bus reference. So - how do I set the 3D settings on a bus in the game engine?

Second, the C# has no definition for a Bus... at all? This seems like an odd omission, and I would appreciate some help in understanding why there is no Bus class in Unity. This would seem to mean that there's no way to create my own spatialized bus from the scripting, because this is a part of the audio engine I cannot access.

In fact, a search through the C++ SDK yields very little information on Buses, and 3D positioning appears to only apply to events and sound sources. How does one attach a bus to a Game Object in order to apply positioning?

asked Feb 3, 2022 in General Discussion by Corey B. (490 points)
An update: this is even more mysterious than I originally thought.

There's a 3D bus example in the IntegrationDemo (Demo3DBus.cpp) that uses the C++ SDK.  I've combed through it multiple times - at no point are 3D attributes explicitly set on the bus, nor is the bus explicitly attached to the registered emitter object. And yet, it works - The bus is being spatialized with the Emitter object.

Can anyone tell me what I'm missing here? I would like to know how 3D bus is being attached to an object.

1 Answer

+2 votes

Edit: I kinda managed to find a solution.

You need to use an intermediate listener as said here: https://www.audiokinetic.com/fr/library/edge/?source=SDK&id=soundengine_listeners.html#soundengine_registering_listeners

It is also possible to use listeners for 3D positioning of submixes. To do so, it is necessary to assign listeners to game object that are also listeners creating a directed graph of game objects, connected by emitter-listener associations.

 So in order the chain becomes:

  1. Sound (one or many) which will post non-positioned events to the 3d bus via AkGameObjs and will have only the Emitter below as listener (with Use Default Listeners unchecked)
  2. Emitter which will be used to output the submix positionally, it will need an AkAudioListener to receive input from all the Sounds and an AkGameObj with Use Default Listeners checked to redirect the output to the Default Listener (player)

This will create a chain like this

Which is still different from the Integration Demo below but at least it works


Original comment below:

I've been banging my head on this for 2 days with almost no results.

First of all I'd like to thank Audiokinetic for their VERY CLEAR and EXHAUSTIVE documentation about their integrations too, they are almost like black boxed.

I was profiling the Integration Demo and our project to see what is that we are doing differently and the Voices tab caught my attention:

This is our project (don't mind the missing event, the profiler started after it was sent), the Game Object and Listener gameobjects are correct, also the bus is selected (even if the positioning does not work)

And here you see the positioning is not working because the bus should be on the other GameObject


While here is the Integration Demo, and as you can see the weird thing is that the Game Object and Listener are the same object

Even though nowhere the Emitter lists itself as a listener, only Listener

 

So how is this supposed to work? All my other settings are the same as in the Integration Demo project so I'm guessing the problem lies in the Unity Integration but I can't figure out where, maybe who wrote that integration could help...


Another possible clue is that in the Integration Demo after the 3d bus it shows that the connection has a volume adjustment, but I can't figure out where in the project it's happening

answered Mar 5, 2023 by Xriuk (250 points)
...