Point Sound Source
In real life sounds usually originate from a single point like a trumpet, a mouth, the beak of a bird or the various parts in a car-engine.
But when you listen to a highway or other "linear" sound-sources you don't hear the individual cars and it's even more impossible to hear the individual parts in the car-engines.
Game engines usually only gives you point-sourced sounds to work with, so to create for instance a river, you need to do something like I did in the Unity example below. I've placed a number of point sound-sources in the middle of the river with some spacing. Notice how the sound is "uneven" when you walk from one point-sound to another, and you never really feel like you are standing in the river.
Point-Sourced Sounds Example
This example is a bit exaggerated to prove my point (yup - that's how I do things ;-).
Linear, Cubic or other Sound Sources
So I've made a simple prototype to emulate linear sound-sources (in this case it's actually a loooong cube, but it can also be other geometrical shapes).
This way I can make a river sound more "realistic" by letting the sound of the river "follow" the character along the edge of the river and when you walk into the river I gently slide the sound from mono to stereo, so it sounds like you are surrounded by the river instead of using mono/point-sounds like in the first example...
And all of this by using only one stereo sound-source instead of multiple mono sound-sources like I did in the first example.
Cube-Sourced Sounds Prototype
This gives a more realistic experience of the river
And it was actually made with very few lines of code in Unity (all power to Unity!!!).
Cheers,
Kenneth
Very impressive. This is done client-side, correct?
Yup - it's even a quite simple script in Unity.