Sound Falloff By Distance

Tobias Hansson
Reverb project
Published in
2 min readMar 15, 2021

Perhaps one of, if not, the most important aspects of sound simulation is that sound is perceived to be weaker the further away we are from the source. The rate at which sound becomes weaker is exponential, meaning that if we double the distance we are away from the source, the sound intensity is a quarter of what it was before. Literally translating this to our simulation would mean that if our sound has a strength of 1.0f at 1 meter from its origin then at 2 meters the sound will only have a strength of 0.25f. This is both terrible for our simulation and also not correct. Sound is measured on the decibel scale, not as a rational number. This makes it quite difficult to translate the way sound actually works into the system we have built up until now.

So, we can't just divide the strength of our rays with the distance squared, we would have no sound left (we also reach our strength cutoff for rays really quickly)! An alternative is to multiply the ray strength by the inverse of log(distance) in base 2. This isn’t terribly accurate but it gives a far more practical result.

The actual fallof for sound over distance
Our approximation

The two graphs above show first how sound intensity should fall off, the second how it looks with our logarithmic solution. If anything, the second graph feels better, as not as much sound falls off in the beginning and it takes longer to reach zero!

Given more time, this is definitely a part of the simulation that we would like to improve.

No animation this time! Painting looks pretty much the same as the last Blog entry!

--

--