Ambisonics are a type of audio that provide a representation of sound that can completely surround a listener. They can provide an audio skyboxA special type of Material used to represent skies. Usually six-sided. More info
See in Glossary for distant ambient sounds, and are particularly useful for 360-degree videos and applications.
Ambisonics are stored in a multi-channel format. Instead of mapping each channel to a specific speaker, ambisonics represent the soundfield in a more general way. You can rotate the soundfield based on the listener’s orientation (such as the user’s head rotation in VR). You can also decode the soundfield into a format that matches the speaker setup.
To select an ambisonic audio decoder in your project, open your project’s Audio settings (menu: Edit > Project Settings > Audio). Select an Ambisonic Decoder Plugin from the list of available decoders in the project. There are no built-in decoders included with Unity, but some VR hardware manufacturers provide them in their audio SDKs for Unity. Check your target platform manufacturer’s documentation to learn if this is available for your project.
To import an ambisonic audio clipA container for audio data in Unity. Unity supports mono, stereo and multichannel audio assets (up to eight channels). Unity can import .aif, .wav, .mp3, and .ogg audio file format, and .xm, .mod, .it, and .s3m tracker module formats. More info
See in Glossary, import a multi-channel B-format WAV file with ACN component ordering, and SN3D normalization. In the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
See in Glossary window for the audio clip, enable Ambisonic.
To play an ambisonic audio clip through an Audio SourceA component which plays back an Audio Clip in the scene to an audio listener or through an audio mixer. More info
See in Glossary:
When Unity plays an ambisonic audio clip, it decompresses the file, if necessary, then decodes it to convert it to the project’s selected speaker mode. It then applies the Audio Source’s effects.
Note: Reverb zones are disabled for ambisonic audio clips.
For information on how to author a plugin, see the Unity User Manual pages on the Native Audio Plugin SDK and Audio Spatializer SDK. You should also download the Audio plugin SDK.
There are two changes to AudioPluginInterface.h
for ambisonic audio decoders:
UnityAudioEffectDefinitionFlags_IsAmbisonicDecoder
.UnityAudioAmbisonicData
.During the plugin scanning phase, this flag notifies Unity that this effect is an ambisonic decoder. Unity then allows the decoder to display as an ambisonic decoder option in your Project settingsA broad collection of settings which allow you to configure how Physics, Audio, Networking, Graphics, Input and many other areas of your project behave. More info
See in Glossary for Audio.
definition.flags |= UnityAudioEffectDefinitionFlags_IsAmbisonicDecoder;
The UnityAudioAmbisonicData
struct is similar to the UnityAudioSpatializerData
struct that Unity passes into spatializers, but with the addition of an ambisonicOutChannels
integer. For more information on the UnityAudioSpatializerData
struct, see the Audio Spatializer SDK documentation on spatializer effect meta data.
For the UnityAudioAmbisonicData
struct, the ambisonicOutChannels
should be set to the DefaultSpeakerMode
’s channel count. Ambisonic decoders run early in the audio pipeline in Unity, and ambisonicOutChannels
tells the plugin how many of the output channels Unity needs to use.
If you play back a first order ambisonic audio clip which contains 4 channels, and your speaker mode is stereo (which has only 2 channels), an ambisonic decoder’s process callback passes in 4 for the in and out channel count. The ambisonicOutChannels
field is set to 2. The plugin should output its spatialized data to the first 2 channels and zero out the other 2 channels.
The Unity ambisonic sources framework can support first order ambisonics. The plugin interface includes the information to support binaural stereo and quadA primitive object that resembles a plane but its edges are only one unit long, it uses only 4 vertices, and the surface is oriented in the XY plane of the local coordinate space. More info
See in Glossary output, but the plugin itself determines which outputs are supported. Initially, ambisonic decoder plugins support first order ambisonic sources and binaural stereo output. There is no support for second order ambisonics.
There is nothing in the framework that is specific to any of the different ambisonic formats available. If the clip’s format matches the ambisonic decoder plugin’s expected format, then ambisonic audio should work without issue. Unity’s preferred ambisonic format is B-format, with ACN component ordering, and SN3D normalization.
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising. Some 3rd party video providers do not allow video views without targeting cookies. If you are experiencing difficulty viewing a video, you will need to set your cookie preferences for targeting to yes if you wish to view videos from these providers. Unity does not control this.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.