thedocruby / resounding

A New Minecraft mod that provides realistic audio physics using parallel wave tracing and an improved physics algorithm.
https://thedocruby.dev/resounding
GNU Lesser General Public License v3.0
84 stars 4 forks source link

Absorption Brightness muffles every source-sound #50

Closed YurgenSchn closed 2 years ago

YurgenSchn commented 2 years ago

Disclaimer: the Important Edit describes what might be a shared airspace detection problem, not necessarily an absorption brightness issue

By isolating reverb and air/humidity absorption (reverb volume and air/humidity absorption to 0), i found that absorption brightness will muffle every source sound (by setting it to a low value, obviously). This includes footsteps, breaking block, placing, throwables - i suppose everything. The weaker the reverb would be, had it been enabled, the more muffled sound will be... so maybe it's intended, as a setting that muffles sounds in case its reverb has been "lost"? In this case, perhaps the setting explanation left me a bit confused - but even then, i don't think that would happen in real life, as I elaborate on expected behaviour.

Expected behavior Think of those silent rooms, anechoic chambers. Every reverb is absorbed there, but the sound itself won't be muffled. I believe the "Absorption Brightness" should control how clear sound can be heard through blocks, only across different air spaces - and, currently, if it's set lower, this does happen as I go to another airspace (tested with jukeboxes). What i mean by this report is that maybe this setting should be reworked to a "Occlusion Brightness"

Important Edit: i've been testing this in a big cave, going in and out of a bunch of smaller spaces conected to it. But, to further verify my hypothesis, i built a fully closed wool chamber inside this big cave. Turns out: if the wool chamber is fully closed, source sounds inside will be fine, as anechoic chambers O.O (for the most part, some grounded player sounds are still being muffled, related to issue #38, and arrow-hitting sounds are completely muffled, but that is rare, inconsistent). However, if the chamber is open, and connected to the cave, then sounds produced near the opening will be muffled - and by bumping the reverb volume up, there will be a bit reverb too. Playing a jukebox at the opening, and going outside? It sounds much clearer than inside - though, not as clear as if it was played fully outside, maybe the wool blocks interfering.

So maybe absorption brightness INDEED only controls occlusion brightness, but it's the sounds that are beign assigned to the wrong airspaces? Another issue at play? Switching the Shared Airspace Detection setting from Fancy to Fast doesn't seem to change anything.

It seems like a sound can only be heard properly at one airspace, in it's "main" airspace (not necessarily the origin), and all other spaces will be treated with occlusion absorption effects. This wool chamber "threshold" test exposes something that can be perceived in virtually every natural environment.

My Machine

thedocruby commented 2 years ago

This is all very helpful! I was having a hard time understanding the problem, but I think this will help! It's probably just a problem with the formulas i use to calculate the reverb. This should be fixable, but it will take some time to get right. On top of this, i am rather lacking in motivation and energy at the moment, so it might be a couple more days before I get to it. Still, I really appreciate all the work you've done!

thedocruby commented 2 years ago

I found the issue! After I stepped away for a week or two, I took another look at my code and instantly knew what I was forgetting! This issue also helped a lot, so many thanks for that. I will be releasing an alpha version for testing the change before I continue to publish the last Milestone Alpha for milestone 1. Once I do all of that, (assuming no more major bugs) I will be ready to start Milestone 2!