Automatic Reverb

Moderator: GZDoom Developers

Post Reply
User avatar
Zenon
Posts: 530
Joined: Thu Apr 20, 2006 6:05 pm
Graphics Processor: nVidia with Vulkan support
Location: New Zealand

Automatic Reverb

Post by Zenon »

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
User avatar
nazakomu
Posts: 131
Joined: Wed Nov 30, 2016 12:51 am
Graphics Processor: nVidia with Vulkan support

Re: Automatic Reverb

Post by nazakomu »


I suppose you're thinking of something exactly like this.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Automatic Reverb

Post by Graf Zahl »

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
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.
User avatar
Zenon
Posts: 530
Joined: Thu Apr 20, 2006 6:05 pm
Graphics Processor: nVidia with Vulkan support
Location: New Zealand

Re: Automatic Reverb

Post by Zenon »

nazakomu wrote:I suppose you're thinking of something exactly like this.
Bingo
Graf Zahl wrote:Insta-[No]
Nice shootin', Tex. I admire your speed.. but can we continue talking about this? It interests me quite a bit
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.
Perhaps just have the reverb change depending on how close the player is to the edge of a solid sector?
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Automatic Reverb

Post by Nash »

Cyberdemon2006 wrote:
Graf Zahl wrote:Insta-[No]
Nice shootin', Tex. I admire your speed.. but can we continue talking about this? It interests me quite a bit
How to get zero interest from devs to do anything for you, lesson 1. :mrgreen:
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Automatic Reverb

Post by Graf Zahl »

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?
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Automatic Reverb

Post by Chris »

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.
nazakomu wrote:I suppose you're thinking of something exactly like this.
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).

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.
User avatar
Caligari87
Admin
Posts: 6174
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Automatic Reverb

Post by Caligari87 »

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.
  1. Extend REVERBS to have a section for acoustic material definitions
  2. Extend SNDINFO or REVERBS to allow mapping acoustic material definitions to textures
  3. Alternatively or in addition, allow assigning acoustic materials to linedefs/planes via UDMF custom properties.
  4. If no materials set, fall back to some sort of generic default material.
  5. 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.
I feel like this could give decent results even with very few rays and generic default "concrete wall" materials to begin with. I could eventually see GZDoom shipping with built-in acoustic materials definitions for classic Doom and other supported games, much like brightmaps and light definitions.

8-)
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: Automatic Reverb

Post by Gez »

Caligari87 wrote:
  1. Extend REVERBS to have a section for acoustic material definitions
  2. Extend SNDINFO or REVERBS to allow mapping acoustic material definitions to textures
You missed [wiki]TERRAIN[/wiki].
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”