Automatic Reverb
Moderator: GZDoom Developers
- Zenon
- Posts: 530
- Joined: Thu Apr 20, 2006 6:05 pm
- Graphics Processor: nVidia with Vulkan support
- Location: New Zealand
Automatic Reverb
Could GZDoom automatically alter reverb in realtime during gameplay based on the size of the current room the player resides in?
Or perhaps this could be done on startup and save the reverb files, the same way 3DGE would create GLNodes for a mapset on startup
Or even better, Mappers could define what type of reverb each room on their maps have, and they could include a reverb file in their wad/pk3
Or perhaps this could be done on startup and save the reverb files, the same way 3DGE would create GLNodes for a mapset on startup
Or even better, Mappers could define what type of reverb each room on their maps have, and they could include a reverb file in their wad/pk3
- nazakomu
- Posts: 131
- Joined: Wed Nov 30, 2016 12:51 am
- Graphics Processor: nVidia with Vulkan support
Re: Automatic Reverb
I suppose you're thinking of something exactly like this.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Automatic Reverb
That is already possible. But you still need to configure the map to select proper reverb per section. It cannot be done automatically because there's no reference to what a room is supposed to be.Cyberdemon2006 wrote:Or even better, Mappers could define what type of reverb each room on their maps have, and they could include a reverb file in their wad/pk3
- Zenon
- Posts: 530
- Joined: Thu Apr 20, 2006 6:05 pm
- Graphics Processor: nVidia with Vulkan support
- Location: New Zealand
Re: Automatic Reverb
Bingonazakomu wrote:I suppose you're thinking of something exactly like this.
Nice shootin', Tex. I admire your speed.. but can we continue talking about this? It interests me quite a bitGraf Zahl wrote:Insta-[No]
Perhaps just have the reverb change depending on how close the player is to the edge of a solid sector?Graf Zahl wrote:That is already possible. But you still need to configure the map to select proper reverb per section. It cannot be done automatically because there's no reference to what a room is supposed to be.
Re: Automatic Reverb
How to get zero interest from devs to do anything for you, lesson 1.Cyberdemon2006 wrote:Nice shootin', Tex. I admire your speed.. but can we continue talking about this? It interests me quite a bitGraf Zahl wrote:Insta-[No]
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Automatic Reverb
Cyberdemon2006 wrote: Perhaps just have the reverb change depending on how close the player is to the edge of a solid sector?
Ugh, do you have any knowledge about how a sound system works?
- Chris
- Posts: 2940
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Automatic Reverb
Generating proper reverb parameters depends on information that's not stored in the map, such as the surface material properties (diffuseness, absorbancy), air properties (transmission speed, absorbancy), and the overall density of surfaces (Doom maps tend to be low on detail, so it may need extra help to specify what the room represents). Saying that, reverb properties also tend to be set up artistically; that is, they're intended to create a specific response the sound designer wants, rather than what is 100% realistic for the geometry.
There are things I'd like to do to make the reverb more dynamic however, such as focusing early reflections on nearby walls and using multiple reverb instances to indicate adjacent environments (e.g. a sound in the adjacent room taking on properties of that room's reverb, instead of only using the player's current room for all reverb), which would also allow for smooth transitions between environments. But that would need more work engine-side to calculate the info before the sound system could do anything with it.
Also, the fact hat it's playing a pretty old game with few sounds on a fairly simple map with a rather powerful GTX Titan GPU suggests to me it's not very scalable. Effective use of OpenAL's reverb capabilities could get similar (if approximated) results even on relatively weak CPUs (like mine), so long as the engine/maps help out a bit.
There are things I'd like to do to make the reverb more dynamic however, such as focusing early reflections on nearby walls and using multiple reverb instances to indicate adjacent environments (e.g. a sound in the adjacent room taking on properties of that room's reverb, instead of only using the player's current room for all reverb), which would also allow for smooth transitions between environments. But that would need more work engine-side to calculate the info before the sound system could do anything with it.
It's important to bring up that as that video states, it generates 4 thousand rays, for 3rd order reflections (that is, 3 "bounces" per sound). Assuming a typical speed of sound in a room that's 5 meters in diameter, that's a grand total of 30 to 40 milliseconds (reverb can last 10 to 100 times longer). The number of bounces/rays increase exponentially with order, since each bounce creates multiple reflections (the amount of which depending on the density of the room and material diffusion).nazakomu wrote:I suppose you're thinking of something exactly like this.
Also, the fact hat it's playing a pretty old game with few sounds on a fairly simple map with a rather powerful GTX Titan GPU suggests to me it's not very scalable. Effective use of OpenAL's reverb capabilities could get similar (if approximated) results even on relatively weak CPUs (like mine), so long as the engine/maps help out a bit.
- Caligari87
- Admin
- Posts: 6174
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Automatic Reverb
I actually did my own poor-man's version of the video, with invisible bouncing projectiles that fired in all directions whenever I fired the pistol and played my gunshot sound at increasingly lower volume when they bounced or died. It was REALLY rough, but interesting, and proves to me it's not impossible to even with the bare minimum of fakery.
Hear me out on this (somewhat crazy) idea.
Hear me out on this (somewhat crazy) idea.
- Extend REVERBS to have a section for acoustic material definitions
- Extend SNDINFO or REVERBS to allow mapping acoustic material definitions to textures
- Alternatively or in addition, allow assigning acoustic materials to linedefs/planes via UDMF custom properties.
- If no materials set, fall back to some sort of generic default material.
- Allow the user to set number of traces, number of bounces, and (if available) whether realtime sound reflections are calculated on the GPU or CPU.
Re: Automatic Reverb
You missed [wiki]TERRAIN[/wiki].Caligari87 wrote:
- Extend REVERBS to have a section for acoustic material definitions
- Extend SNDINFO or REVERBS to allow mapping acoustic material definitions to textures