vlad2305m / Sound-Physics-Fabric

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

Absorption, Roughness, Diffusion, and Occlusion should be different properties #53

Closed thedocruby closed 2 years ago

thedocruby commented 2 years ago

Absorption is the amount of sound that is lost when sound is reflected, while Occlusion is the amount of sound that is lost when the sound is transmitted. Roughness is how much the reflected sound is scattered on the surface, and diffusion is how much the transmitted sound is scattered within the material. Think about it like light. Obsidian is pitch black and absorbs all light going through it, but is shiny and reflects light just fine. it breaks down a little bit with the other two because of refraction, but without refraction you would be able to see through frosted glass just fine, even though the reflections would not be clear. these examples make it clear that these four properties should be separate, but they are currently either all the same variable or not accounted for at all.

thedocruby commented 2 years ago

A great example is amethyst blocks. In theory, they should have a high roughness but low diffusion and absorption. As of now they just have an average-ish reflection, which is physically inaccurate.

vlad2305m commented 2 years ago

Diffusion is not performance-friendly. Everything else can be done to a certain extent.

thedocruby commented 2 years ago

@vlad2305m after a certain amount of thought i realized this. I also realized that it was five values, not four, diffusion and roughness requiring random bounces based on probability, and the other three being absorption, reflection, and occlusion, which all three taken together should add up to one, so two properties is sufficient if we are not considering diffusion and roughness. However, now that I know how the properties are related, I see that the math used in Sound Physics is not physically accurate.