atmoky trueSpatial for Unity v1.2.0 has been released! Check out the Changelog to learn more.
Source Properties

Source Properties

To render spatialized sound sources more realistically, the atmokySpatializer plug-in provides a set of parameters that can be used to control the sound of a source object. These parameters can be set programmatically or via the Inspector by using the atmokySource.cs script (Add Component -> Atmoky Source), which exposes all parameters as sliders.

Source Occlusion

The atmokySpatializer plug-in has an occlusion parameter, which can be used to simulate the occlusion of a sound source by an obstacle. The occlusion parameter is a value between 0 and 1, where 0 means no occlusion and 1 means full occlusion.

Source Directivity

Per default, all audio sources are omnidirectional, meaning that they sound the same from all directions. Real audio sources however are not omnidirectional, but rather emit more sound energy in certain directions than in others.

With the atmokySpatializer plugin, the directivity of an audio object can be shaped by defining a set of parameters:

The Inner Angle defines the angular spread around the frontal direction where sound is emitted without attenuation. The Outer Angle defines the angular spread around the frontal direction outside of which sound is attenuated according to the Outer Gain and Outer Low-Pass parameters. In between the inner and the outer angle, the attenuation is linearly interpolated / blended.

The Outer Gain is a value between 0 and 1, where 0 means that the sound is completely attenuated and 1 means that the sound is not attenuated at all. The Outer Low-Pass is a value between 0 and 1 controlling the intensity of the low-pass filter, where 0 means that the sound is not filtered at all and 1 means that the sound is completely filtered.

For example, if you want to recreate the directivity of a human speaker, you could set the inner angle to 90°, the outer angle to 180°, the outer gain to 0.5 and the outer low-pass to 0.6.

The current directivity parameters can be visualized in the Scene View when the source object is selected. Additionally, a two-dimensional polar plot is displayed in the Inspector, which shows the directivity pattern of the source object. To control the directivity parameters more intuitively, you can also use the Directivity tool: The green handle controls the inner angle, and the blue one the outer angle. With the blue radius handle, you can adjust the outer gain.

Alternatively, there is a dropdown list of presets for the directivity settings as well. These presets can either be used as is or serve as a starting point that can be further refined as required.

Near-Field Effects

When sources are far away from the listener, the binaural cues (i.e. the interaural time- and level differences) are almost independent of the source distance. However, when sources are close to the listener, the binaural cues are strongly dependent on the source distance. This is the reason why very close sources, such as the sound of a voice whispering in our ear, sound very distinct and evoke a special feeling of intimacy. More precisely, the lower frequencies of close sources are amplified, the interaural level differences are increased, and the sound color for each individual ear changes due to the parallax effect.

The atmokySpatializer plugin mimicks these effects in order to make the spatialized sound sources more realistic. The following parameters control the impact of the near-field effect:

  • Start Distance: defines the distance at which the near-field effects start to to kick in.
  • Gain: defines the maximum broadband gain in dB that is applied
  • Bass Boost: defines the maximum gain in dB that is additionally applied to the low frequencies (< 500Hz)

Note that with the nearfield effects enabled, sounds near the listener will be boosted by the dialed in amount and can become prone to clipping. Please consider adjusting the overall volume or prevent loud sounds by adding a compressor/limiter after the renderer.

Stereo Sources

When the audio clip of a source object is stereo, the default behaviour of the atmokySpatializer plugin is to render both channels of the stereo audio clip as a single source, i.e. the stereo sum is rendered. However, we have added a neat little trick to keep the stereo image of a the clip intact. We do this by applying the HRTF of the left ear to the left channel and the HRTF of the right ear to the right channel. This way, the stereo image is preserved while the source is still rendered from a single point in space. You can control this behaviour by adjusting the Spread parameter under the "3D Sound Settings" of the source. A value of 0 means that the stereo sum is rendered, and with the Spreadturned all the way up, the stereo image is fully preserved.


You can adjust the spread value dependent on the source's distance to the listener, which can be used to add a nice effect: When the source is far away, the spread is low such that the stereo channels are summed, but when the source is close, the spread is high such that the whole stereo image is rendered.

atmoky Logo

© 2024 atmoky, GmbH.
All rights reserved.

We use cookies to measure and improve your browsing experience, and serve personalized ads or content.