Jump to content


Photo

Getting started with the EFX room reverb system (wip)

sound openal efx reverb delay tutorial

31 replies to this topic

#26 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 889 posts

Posted 27 May 2018 - 11:41 PM

I have tried to update the wiki page and realized that the whole system is quite messy.

This awful system of translating one values to other values, with total confusion of EAX / EFX values...

And no presets, that's why Judith had to translate them by hand (sorry for that).

I simply don't know how to update the section on properties now.

 

I think for 2.07 it would make sense to do the following:

  1. Implement a new set of properties, which will have exactly the same names as the EFX constants (without the leading "AL_EAXREVERB_"). These properties would be passed to EFX as is, no need to convert bells to dolls.
  2. Implement a "preset" property, similar to what "environment" property meant before EFX update killed it. Enumerate all presets listed in efx-presets.h and make them all available by number.
  3. All of these changes will be available when "Version 2" is specified in the first line of the file. The "Version 1" definitions continue to work as they do now (forever).

If we do this, then we can simply reference the OpenAL EFX manual in wiki, which already has detailed explanation of all properties.

Also, we can list preset names with their numbers in the wiki --- mappers will most likely simply use this number. The number of available presets will increase of course.

 

The possible downside is breaking compatibility with Doom 3 and EAX (although kcat recently noted that at least one property is converted incorrectly from EAX to EFX, so EAX compatibility is not perfect now).

But I have a feeling that both are rather dead now, so maintaining this compatiblity does not provide us with any additional knowledge of EFX.

 

P.S. If we recall another TODO for 2.07, then it is a global revision of all stock sound shaders and putting no_efx in some.


  • Judith and Anderson like this

#27 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1284 posts

Posted 28 May 2018 - 12:19 AM

I agree that it would be better to have EFX system that reflects the actual OpenAL standard, instead of being something on its own. Mappers could just copy and paste presets found elsewhere.



#28 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 889 posts

Posted 03 June 2018 - 10:34 PM

Ok, added feature request: 4815


  • Judith and Anderson like this

#29 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 62 posts

Posted 08 June 2018 - 05:03 AM

Hello Judith,

 

Thanks a lot for the presets and thanks a lot @stgatilov for the wiki text.

 

Just created the set-up as per the instructions and copied in the cave reverb of yours. Works perfectly and adds significantly to the mood of the settings!

 

Can't wait to hear the other presets in action, expecially the sewer script as I think I have a fitting environment for it.


  • Judith and Anderson like this

#30 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12552 posts

Posted 25 June 2018 - 04:38 PM

How about settings for "rooms" with rain or snow or fog in them?
  • Anderson likes this

#31 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 889 posts

Posted Yesterday, 11:54 PM

How about settings for "rooms" with rain or snow or fog in them?

Probably AL_EAXREVERB_AIR_ABSORPTION_GAINHF:

The Air Absorption Gain HF property controls the distance-dependent attenuation at high frequencies caused by the propagation medium. It applies to reflected sound only. You can use Air Absorption Gain HF to simulate sound transmission through foggy air, dry air, smoky atmosphere, and so on. The default value is 0.994 (-0.05 dB) per meter, which roughly corresponds to typical condition of atmospheric humidity, temperature, and so on. Lowering the value simulates a more absorbent medium (more humidity in the air, for example); raising the value simulates a less absorbent medium (dry desert air, for example).

 

 

It is called air absorption hf in the current effects system, and it must currently be set in millibels instead of gain.

However, this does not apply to direct sound --- those should be affected by sound source settings (outside of EFX).

 

To be honest, the more I look into EFX effects guide, the more I see that D3 integration with it is rudimentary.

It does not take into account at least the following things:

1. Listener close to walls in a big room hears things differently than in the middle of the room.

2. When listener-source direct path is blocked, the sound should be very different (i.e. occlusion).

3. The sounds coming from neighboring rooms should be handled differently, including different reverb properties and setting some overall direction for them.



#32 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1284 posts

Posted Today, 02:03 AM

To be honest, the more I look into EFX effects guide, the more I see that D3 integration with it is rudimentary.

It does not take into account at least the following things:

1. Listener close to walls in a big room hears things differently than in the middle of the room.

2. When listener-source direct path is blocked, the sound should be very different (i.e. occlusion).

3. The sounds coming from neighboring rooms should be handled differently, including different reverb properties and setting some overall direction for them.

 

I noticed that myself, it's basically using the reverb settings of a room the player currently stands in. Sounds coming from other rooms don't have properties of those rooms, even if you just stand at the open doorway. You can check that by standing next to visportal with location separator and going through it repeatedly.


Edited by Judith, Today, 02:50 AM.




Reply to this topic



  



Also tagged with one or more of these keywords: sound, openal, efx, reverb, delay, tutorial

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users