Dynamic Audio Reverb

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)


Links

Example place

Get it on Roblox

Set-up

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!

30 Likes

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!

3 Likes

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!

2 Likes

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.

3 Likes

ignoring invisible walls can be as simple as checking if the part that was hit has transparency of 0. could be user defined as well.

3 Likes

The rays will not hit anything behind the invisible walls if you do that, which may cause problems for some people.

3 Likes

skip it then add it to the blacklist table and create a new raycast

3 Likes

New Update

  • Settings module added

  • Filter descendants table is now user defined in the settings module, meaning you can fix invisible walls being detected

  • Cleaned up the code

  • Removed unused variables

It is suggested that you update the script in your game.

2 Likes

oh, this is awesome, I’ve always wanted to make something like this but never knew how to go about it. Great resource!

2 Likes

YES. Now I don’t have to tear off my limbs thinking about how to create a system like that.

3 Likes

Just wanted to ask if you are still working on this? Would love to see more features.

3 Likes