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

Fixed critical typo, Raycasting improvements #12

Closed thedocruby closed 3 years ago

thedocruby commented 3 years ago

Fixed a critical typo causing both the ray count and ray bounce count to be set to the config file's ray count value

Changed the raycast distribution from a golden spiral to the more effective offset Fibonacci lattice. (see http://extremelearning.com.au/how-to-evenly-distribute-points-on-a-sphere-more-effectively-than-the-canonical-fibonacci-lattice/) This should improve render performance by ensuring an even distribution of rays.

thedocruby commented 3 years ago

I compiled and ran this branch on my own Minecraft instance and confirmed that the changes do make the performance issues disappear that I mentioned in my discussion post. Also, the new distribution does appear to have made the reverberation effect more even and consistent across different environments. I am attaching the compiled jar so that you can test it yourself. soundphysics-2.0.patch1.zip

vlad2305m commented 3 years ago

Wow. Thank you very much. I'll release it as soon as I fix Intellij. I had no clue on the spherical distribution, and tried to increase numRays by improving time performance of ray tracing. ^ω^ In fact, as long as the distribution is time-consistent, it's fine.

vlad2305m commented 3 years ago

Released. Please tell me how it goes after some time ^ω^