- Home /
Stereo sounds in 3D space
How can I make an audio source play in stereo, with 3D distance attenuation, but without 3D panning?
As soon as I use the 3D sound settings, Unity turns the audio clip into panned mono, instead of stereo. When I set the spread to 180, the panning is off, but it is still pure mono. (The audio clip setting Force to mono IS unchecked).
Answer by syclamoth · Sep 14, 2011 at 09:59 AM
Sounds play in stereo to give the illusion of depth to the sound- Just like we have two eyes to let us see how far away something is, we have two ears to hear how far off, and what angle, sounds are coming from. If you play a sound in 3d space, it does not make sense to play it stereo, because all of a sudden it is coming from exactly one point in space- the audio engine then converts the sound back into stereo when it gets sent to the speakers on your computer (so that it sounds like it comes from a point in space). If you want 3D distance attenuation, try just using the sound as a 2D sound, and manually changing the volume in a script which checks the distance to Camera.main.
@syclamoth; Thank you for your answer! It makes perfect sense for sounds co$$anonymous$$g from a single point in space, but not all sounds do: Wind, water, rain, traffic, ambiences etc. originates from a direction, but not a single point. The audio engine i Unity doesn't convert the sounds back into stereo, as you say, but to mono in multiple speakers, which is something different. And that is my problem... But using the 2D sound method, and change the volume in a script might do it for me.
Another thing, if you want to simulate directional effects on it, you might consider applying a mild low-pass filter on the sound which attenuates depending on whether the listener is pointing towards the audio source- we get a surprising amount of directional information from the weird shape of our ears, which make sounds have different frequency signatures from different directions.
@syclamoth Have you got more technical information about the shape of the filter and its attenuation function relative to the angle of incidence of sound?
or you can just force the sound clip to mono in the inspector settings
Answer by BerggreenDK · Sep 14, 2011 at 09:51 AM
Not sure I understand the problem, but what if you have two mono sounds and place them manually? would that suit your needs?
Answer by Jon_Olive · Jun 28, 2020 at 09:10 PM
The best solution to this is to treat your stereo sound as coming from 2 "virtual speakers" in 3d space. Unfortunately it's a pain in the arse in Unity since, as BerggreenDK says, you have to split the sound into two monos and have them come from 2 3d sources - one of the few times when Unreal's audio implementation wins over Unity since it supports stereo directly (you just specify the distance between the "speakers"). It really depends on the context of what you are trying to achieve what the spacing between the sources should be - but as a guide - if you want it to sound as it would coming from a pair of stereo speakers you want the subtended angle between speakers at the listening position to be about 60 degrees.
Your answer
![](https://koobas.hobune.stream/wayback/20220612212641im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
What are the advantages of stereo sound effects? 0 Answers
4 Directional Audio 0 Answers
Playing audio in one ear or shifting the mix for the whole listener 0 Answers
There is no 'AudioSource' attached to the 4 Answers
Music Visualiser Troubles 0 Answers