Jump to content


Photo

Getting started with the EFX room reverb system (wip)

sound openal efx reverb delay tutorial

43 replies to this topic

#26 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1017 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
  • 1582 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
  • 1017 posts

Posted 03 June 2018 - 10:34 PM

Ok, added feature request: 4815


  • Judith and Anderson like this

#29 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 118 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
  • 12676 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
  • 1017 posts

Posted 16 July 2018 - 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.


  • Anderson likes this

#32 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1582 posts

Posted 17 July 2018 - 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, 17 July 2018 - 02:50 AM.

  • Anderson likes this

#33 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1017 posts

Posted 19 July 2018 - 10:24 AM

I have got to doing a small revamp of EFX definitions (4815)

There is an important question.

 

OpenAL supports having several different effects on single effect slot.

Aside from EAXREVERB, there are also: REVERB (reduced version of eaxreverb), CHORUS, DISTORTION, ECHO, FLANGER, FREQUENCY_SHIFTER, VOCAL_MORPHER, PITCH_SHIFTER, RING_MODULATOR, AUTOWAH, COMPRESSOR, EQUALIZER.

Speaking solely about room settings, does it make sense to support any other effects than EAXREVERB?

After reading a bit on these effects, it seems that most of they make sense only for vocal/music studios. REVERB and ECHO are the only things interesting, but it seems that EAXREVERB covers them both. Pitch modulation is unlikely interesting (recall that it is configured room-wise), and EQUALIZER is probably not that important.


  • Anderson likes this

#34 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8980 posts

Posted 19 July 2018 - 10:34 AM

Doubtful about the need for any other effects.

 

If we had some sort of Midi engine for dynamic (situational) music, they might be nice but we don't have that feature...


Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#35 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1582 posts

Posted 19 July 2018 - 10:58 AM

Yup, these are seem to be effects similar to what Audacity or Adobe Audition has. Not sure if they're super useful here.



#36 Abusimplea

Abusimplea

    Member

  • Member
  • PipPip
  • 460 posts

Posted 19 July 2018 - 02:21 PM

Aside from EAXREVERB, there are also: REVERB (reduced version of eaxreverb), CHORUS, DISTORTION, ECHO, FLANGER, FREQUENCY_SHIFTER, VOCAL_MORPHER, PITCH_SHIFTER, RING_MODULATOR, AUTOWAH, COMPRESSOR, EQUALIZER.

Speaking solely about room settings, does it make sense to support any other effects than EAXREVERB?

Some of the effects could maybe be used to alter the sound of dream or other surreal / mystic scenes.

The equalizer might additionally allow simulation of environments with special absorption characteristics (underwater or thick fog?).



#37 rich_is_bored

rich_is_bored

    Advanced Member

  • Member
  • PipPipPip
  • 881 posts

Posted 19 July 2018 - 03:34 PM

Equalizer would be good for sound dampening over distance and around obstructions as well.



#38 Abusimplea

Abusimplea

    Member

  • Member
  • PipPip
  • 460 posts

Posted 19 July 2018 - 06:07 PM

Equalizer would be good for sound dampening over distance and around obstructions as well.

It would get applied to all sound the avatar hears while standing in the area with the assigned effect. So i would expect that it could not be applied to specific sources only (wich would be great for dampening a thunderstorm while inside).



#39 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1017 posts

Posted 19 July 2018 - 09:46 PM

Ok, committed the changes to code SVN.

It gives players access to 113 presets  :laugh:

I should not forget to update wiki for 2.07.


  • nbohr1more, Abusimplea and JackFarmer like this

#40 Abusimplea

Abusimplea

    Member

  • Member
  • PipPip
  • 460 posts

Posted 19 July 2018 - 10:32 PM

Ok, committed the changes to code SVN.

It gives players access to 113 presets  :laugh:

I should not forget to update wiki for 2.07.

So will 2.07 give us soft shadows - for sound? ;)



#41 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8980 posts

Posted 19 July 2018 - 10:34 PM

So...

The current system requires setting up locations and working visportals
associated with each location.

How about allowing mappers to define EFX zones with area brushes like the SEED system
or the water system?

This would reduce the amount of entities needed for this.
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#42 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1017 posts

Posted 19 July 2018 - 10:52 PM

So will 2.07 give us soft shadows - for sound? ;)

Perhaps you have too much hope for these changes.

It has no new capabilities compared to TDM 2.06.

Just it makes it somewhat easier to use.

 

How about allowing mappers to define EFX zones with area brushes like the SEED system
or the water system?

If you point me to some particular example, I'll try to see if it is possible.

But if location entity is needed for ambient sounds, then probably it makes no sense to do anything,



#43 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8980 posts

Posted 07 August 2018 - 11:49 PM


If you point me to some particular example, I'll try to see if it is possible.

But if location entity is needed for ambient sounds, then probably it makes no sense to do anything,

 

I know you're on vacation but I guess it's no harm updating the thread here anyway...

 

At the simplest level, it would be great to be able to define a location with a trigger_once brush

 

GetPhysics()->SetContents( CONTENTS_TRIGGER ); ?

 

or like the seedEntityBounds attribute. Ideally, however, this "Location Brush" would act like a parent visportal

and enforce portal bounding behavior within the location.

 

The current system of looking for every hole in a location and making a location separator seems to be very fragile

and cumbersome.

 

Just dragging a brush around the area you want to be a Location would not only benefit EFX but location management in general.

 

 

On a related note...

 

Grayman's upcoming mission is perfectly configured for EFX (as I can tell), yet produces no reverb.

 

Is there anything short of compiling a Debug build that would help to identify what is keeping this from working?


  • Anderson likes this
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#44 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1017 posts

Posted 02 September 2018 - 02:57 AM

The current system of looking for every hole in a location and making a location separator seems to be very fragile

and cumbersome.

Just dragging a brush around the area you want to be a Location would not only benefit EFX but location management in general.

I'm afraid I don't know well how these things are working.

Anyway, two questions:

1) Are you talking about another way of specifying locations in general? I mean, it also affects ambient sounds...

2) While setting up a box volume would work for box-shaped rooms, there are many cases when it is impossible to cover two rooms with boxes so that they don't intersect.

 

Grayman's upcoming mission is perfectly configured for EFX (as I can tell), yet produces no reverb.

 

I think it was some case-sensitivity issue, probably already fixed.

  • Anderson likes this



Reply to this topic



  



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

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users