Jump to content
The Dark Mod Forums

Environmental Audio Extensions (EAX) in TDM


SneaksieDave

Recommended Posts

Building upon the work started here and here, I have put together a small EAX demo for The Dark Mod. In order to experience this in TDM, you'll need access to EAX 4.0 or higher (think Creative Audigy 2 or equivalent -- I got mine last week on ebay for $18 total).

 

* Main download: http://bloodgate.com/mirrors/tdm/pub/eaxdemo.pk4

[Mirror download: Currently it is necessary to Right click and Save Link As eaxdemo.pk4 to your /darkmod folder.]

* Launch TDM and bring down the console, then make sure that the cvars s_useEAXReverb and s_useOpenAL are both set to 1. If they were not already, you must now restart TDM.

* At the console: map eaxdemo

 

There are a few junk items you can drop or throw around to hear sound differences, and the friendly guard footsteps and door opening/closings give a good impression of the different environmental sounds. Known issue: For some reason at this time, the player's footsteps are not affected by EAX, so you can't simply hop or walk around to hear the environment. Hopefully there is a simple fix, because your own footsteps are a large part of the immersion.

 

The sounds included here are based on ones from Doom 3, modified by me in an attempt to get decent approximations. Map authors: do not rely on these sounds as being the best they can be! Tweak and come up with better. I did my best with these but don't put them forward as great or anything. Also: I couldn't yet come up with a good underwater sound, so input is very welcome. If we get a good one I'll add it to the map.

 

Mapping: As indicated in the docs linked, all that's necessary is a mapname.efx definition file, then an info_location in each portal area separated with an info_locationseparator. See the map for examples.

 

Thanks to those who helped paved the way to this. Hopefully this launches a new sound experience for TDM!

 

Edit: Added a video to YouTube for those who aren't yet EAX4.0-ready:

Link to comment
Share on other sites

  • Replies 108
  • Created
  • Last Reply

Top Posters In This Topic

hells yes! this is uber awesome. can you add, perhaps, an underwater area? i would like to hear what those sounds are like.

 

edit:

Also: I couldn't yet come up with a good underwater sound, so input is very welcome. If we get a good one I'll add it to the map.

 

oops

Edited by ungoliant
Link to comment
Share on other sites

Something I haven't quite figured out was why id/Doom3 seem to have not made use of the Creative EAX presets. Maybe because they wanted to support non-Creative cards as well, or perhaps for OpenAL? I'm not sure. Every one of id's environment settings (that I've seen) uses environment = 26, which is EAX_ENVIRONMENT_PSYCHOTIC, instead of using, for example, 22 which is EAX_ENVIRONMENT_UNDERWATER. The most I could figure from what I found online was that id maybe used _PSYCHOTIC as the default setting and then tweaked the parameters with some internal tool which we don't have (apparently it is not in DoomEd, though it might be in Quake4Ed).

 

Would be great if something could be incorporated into DR, perhaps both parameter tweaking in real time as well as writing the result out to the efx file. Would make fine tuning an area or building something complex, like underwater sounds, much easier.

Link to comment
Share on other sites

For the record, Patently Dangerous was released with EAX settings for most areas, but reading this I see why I couldn't hear the effects and was putting in values (based on D3 map values) essentially deaf to them. Now I can go back and hear if they make sense.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

i tried setting the outdoor area as:

reverb "outdoors" {
"environment" 22
}

and it didn't work. in fact, the gaurds footsteps only came out of one speaker.

 

found this after looking around... i wonder if this might help?

 

http://www.atc.creat...ithms/eax20.pdf

 

descriptions, value ranges, etc are at the bottom.

 

I couldn't find similar documentation for EAX 4.0 or EFX, but i'm assuming that much of it is similar or the exact same for sake of backwards compatibility.

 

i'm going to play around with this more when i get home from work. this is a very interesting subject.

Edited by ungoliant
Link to comment
Share on other sites

Yep, I was getting a lot of that "out of one speaker" problem when pushing strange values in for properties. So my guess ended up being that id hardwired it to use _PSYCHOTIC as their base and then tweaked from there. Unfortunate if true, but hopefully we can make underwater despite that.

 

And yep ;) spent a lot of time in that PDF, especially page 29 onwards. A good reference, though I think most of the meat of it is already on the wiki page from Ishtvan.

 

I also found (and discarded the link, but it's out there somewhere) some code for Quake which directly laid out settings they used to define _UNDERWATER for EAX. However, when I tried the values it sounded nothing like water (not to mention half of the parameters being missing because it was for EAX 1(?) not EAX 4)... so my guess there was that they were simply id's tweaks to Creative's _UNDERWATER preset. Bah.

Link to comment
Share on other sites

Building upon the work started here and here, I have put together a small EAX demo for The Dark Mod. In order to experience this in TDM, you'll need access to EAX 4.0 or higher (think Creative Audigy 2 or equivalent -- I got mine last week on ebay for $18 total).

 

* Right click and Save Link As eaxdemo.pk4 to your /darkmod folder. (I have no idea why this link tends to want to read the pk4 into the browser as opposed to forcing the Save As dialog; other sites don't seem to do it. @Tels: can I get a bloodgate mirror to fix this?)

 

Done: http://bloodgate.com/mirrors/tdm/pub/eaxdemo.pk4

 

You should ask dram to fix his server via storing this in an .htaccess file in the server root:

 

AddType application/octet-stream .pk4

 

Btw, very cool!

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I also found (and discarded the link, but it's out there somewhere) some code for Quake which directly laid out settings they used to define _UNDERWATER for EAX. However, when I tried the values it sounded nothing like water (not to mention half of the parameters being missing because it was for EAX 1(?) not EAX 4)... so my guess there was that they were simply id's tweaks to Creative's _UNDERWATER preset. Bah.

 

 

is it also not possible that if you are forced to use the _PSYCHOTIC environmental preset as a base in TDM, that you are simply adding an offset to _PSYCHOTIC by using the values that id used to create a brand new _UNDERWATER environmental preset from scratch?

 

if this is so, is it also not possible that we could create a set of predefined offsets for the _PSYCHOTIC environment that would effectively reset all the values to their default, and then work from there?

Link to comment
Share on other sites

I certainly hope we can. Too bad, as far as I can remember, there's no underwater or anything like it sound in Doom3. Hm. Wait, maybe that area near the beginning where you see a scientist complaining/reprimanding a worker behind a thick glass window (very muffled/muted) would be a good start.

 

Note to all reading who don't have an EAX4.0 ready card: I've updated the first post with a link to a vid on youtube which gives a decent (not great) demo.

Link to comment
Share on other sites

I think I've found what is needed inside the openAL SDK. I'm going to look into this in detail later, but here is what I found inside EFX-Util.h:

 

#define REVERB_PRESET_UNDERWATER \ {22, 1.8f, 1.000f, -1000, -4000, 0, 1.49f, 0.10f, 1.00f, -449, 0.007f, 0.00f,0.00f,0.00f, 1700, 0.011f, 0.00f,0.00f,0.00f, 0.250f, 0.000f, 1.180f, 0.348f, -5.0f, 5000.0f, 250.0f, 0.00f, 0x3f }

#define REVERB_PRESET_PSYCHOTIC \ {25, 1.0f, 0.500f, -1000, -151, 0, 7.56f, 0.91f, 1.00f, -626, 0.020f, 0.00f,0.00f,0.00f, 774, 0.030f, 0.00f,0.00f,0.00f, 0.250f, 0.000f, 4.000f, 1.000f, -5.0f, 5000.0f, 250.0f, 0.00f, 0x1f }

 

I might try to decipher what parameters each of those values correspond to later or something, or someone else can take a crack at it.

 

OpenAL SDK found here: http://connect.creat...%20Windows.aspx and it comes with documentation for EFX too, which is totally backwards compatible with all versions of EAX. I'm pretty sure now that Doom3 uses EFX and not true EAX, as Doom3 uses OpenAL, and EAX uses DS3D, or something like that.... i dunno i'm probably wrong.

Edited by ungoliant
Link to comment
Share on other sites

That might in fact be it, or at least a good start for tweaking. I tried out the underwater values above in the demo map, replacing one of the room definitions with this one from the above:

 

reverb "underwater" {
"environment" 22
"environment size" 1.8000
"environment diffusion" 1.0000
"room" -1000
"room hf" -4000
"room lf" 0
"decay time" 1.4900
"decay hf ratio" 0.10
"decay lf ratio" 1.00
"reflections" -449
"reflections delay" 0.007
"reflections pan" 0.0000 0.0000 0.0000
"reverb" 1700
"reverb delay" 0.0110
"reverb pan" 0.0000 0.0000 0.0000
"echo time" 0.250
"echo depth" 0.000
"modulation time" 1.180
"modulation depth" 0.348
"air absorption hf" -5.0000
"hf reference" 5000.0000
"lf reference" 250.0000
"room rolloff factor" 0.0000
"flags" 63
}

 

As is, it doesn't immediately make you feel like you're underwater, but the sounds are modulated and muted in a way that makes me think, when coupled with TDM's underwater sound (which already works), this might do the trick nicely. As with the rest of the areas in the map, the surface of the water will have to include a visportal and info_locationseparator.

 

Tomorrow though, for me at least; I'm off to bed. -_-

Link to comment
Share on other sites

As with the rest of the areas in the map, the surface of the water will have to include a visportal and info_locationseparator.

 

I'm not entirely sure how locations work when the player passes through one into another, but I have a feeling that if you portal the water surface, that once you stick a toe in the water, the environment effects will change regardless of if your head is submerged underwater or not.

Link to comment
Share on other sites

Who else has had this working in-game so far? I'm experiencing a problem where now after I close each of the heavy effect rooms (tunnel, cavernous), the effect stays even after I leave that zone. This wasn't happening before, so I'm trying to narrow down what the problem might be (I didn't change any drivers, settings, etc). I've had problems before with too many USB connections competing for my sound device, but I've disconnected them all and rebooted and it's still happening.

Link to comment
Share on other sites

Who else has had this working in-game so far? I'm experiencing a problem where now after I close each of the heavy effect rooms (tunnel, cavernous), the effect stays even after I leave that zone. This wasn't happening before, so I'm trying to narrow down what the problem might be (I didn't change any drivers, settings, etc). I've had problems before with too many USB connections competing for my sound device, but I've disconnected them all and rebooted and it's still happening.

 

Currently switching back from release 1.02 to trunk to test it out.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...