djpadbit / Sound-Physics

A Minecraft mod that provides realistic sound attenuation, reverberation, and absorption through blocks.
GNU General Public License v3.0
133 stars 19 forks source link

Echo is not working properly #66

Open andris86 opened 3 years ago

andris86 commented 3 years ago

I did huge testing on this mod and found several flaws.

First - is echo broken?

So, on a clear, flat area (outside, under an open sky) I built a stone wall and while standing some blocks away, made a loud sound. In real life, sound would bounce off the wall, creating an echo. This was not the case in the game. I built the second wall against the first wall, I tested once more. Again - no echo, sound wave didn't bounce off the walls. Just plain, dry sound. Consider looking into this.

There is a problem with loudness of each individual sound. Door closing/opening sound could be heard at the maximum sound allowance distance. At the same time piston moving sound stops way quicker. Explosions are way too quiet, quieter than mob sounds. Explosion should cause very intensive vibrations through the blocks what could be heard chunks away. Plus, if echo was working, explosion sound effect would end up really nice and realistic.

In order to fix this issue, I came up with an idea where you set a loudness value to every sound playing in Minecraft which returns the max distance at which a sound could be heard. But this may be really hard to implement, I guess.

djpadbit commented 3 years ago

There's echo but it's not really realistic echo. Due to the limitations of the version of openal-soft shipped with minecraft 1.12.2, you can only have 4 auxiliary sends for effects on a source, all of them being used by the EAX Reverb. Of which the parameters don't change and are set in advance but what changes on each source is a lowpass filter for each reverb and for the direct sound. And even in the newer minecraft versions, it would require some big changes to the code to be able to have "proper" echo effects. Sound Physics is faking most of the effects. I recently added some echo in theses parameters but it's only when there's reverb. The loudness issue is something more fixable but it's kind of complicated due to all the edge cases.