To clarify, I don’t suggest actually using this in your experience. This is kinda just a proof of concept.
Hello, developers! Today, I have released a simple open source script that dynamically adjusts SoundService’s ReverbType value to add onto the immersion. Here it is in action:
(Audio may be compressed, it’s best you go in game with the link below to try it yourself)
Place the model in StarterPlayer > StarterCharacterScripts. That’s it, unless you want to configure the material settings, which are a child of the script. Edit the ReverbType attribute on them if so.
How it works
A bunch of raycasts/lines are shot out of the character in random directions, each one showing the material that they hit. The material that gets the most hit will be selected.
Performance
There has been no noticeable performance drops using this method. Though, you will probably want to include a toggle for the script in your game’s settings.
Currently known issues
The reverb will stutter sometimes
To-do
Add multiple types of reverb (eg. zones, ReverbSoundEffect)
Enjoy, and please tell me if you encounter any bugs or errors!
This is a pretty accurate recreation. It’s not like the original but it still is very useful! The only difference is that the rays are being casted from the sound source and not the player. In the recreation they are being casted from the player which leads to background music having echo only when you are inside something. I think this is more realistic for sounds that are not playing in the background. Give this man a like, he is a legend!
I have 1 question. How can you add more materials and change their sesitiviy/reverb? Just add a value with the material name in the local script and change something in the script? Thanks!
You don’t have to change anything in the script, just duplicate one of the pre-existing values and change the name to the material you want and the ReverbType attribute to one of the ones listed here.