Jump to content
The Dark Mod Forums
Sign in to follow this  
RPGista

Visportals that can decrease sound

Recommended Posts

So it averages the volume and then projects the same value through all openings, windows or open doors?

I would have thought it might be more like a fading effect, it's still a little quieter by a closed window & a bit louder by an open door, and the volume might gradually fade from one to the other by proximity as you move from one to the other or some variation of fading.

 

Some terms: Path = what the sound follows as it goes from the real speaker, through portals, to the player. Virtual Speaker = where the sound comes from when it's played, which may or may not be in the same place as the real speaker.

 

I abandoned the averaging method when it resulted in sudden volume changes as you move around. Unacceptable.

 

Now, if several paths go through the same area, the one with the highest volume is the "winner" and the others are ignored.

 

If several paths make it back to the player, the one with the highest volume at the player's position contributes its volume, but the virtual speaker's position is a weighted average of the most recent virtual speaker from each path. This way the volume doesn't jump up and down as you move. The position of the virtual speaker changes.

 

So if you move from an open doorway where the sound is loud, toward a closed window where the sound is muffled, what you hear goes down in volume and the virtual speaker slides from the doorway to the window. If you continue on beyond the window, at some point the only surviving path is the one through the window, and the sound volume continues to diminish as you move away.

 

With most sounds, you can hear the sound direction change as you move, when it's coming through more than one portal. Examples in the test map include the guards' footsteps and voices. Other sounds, like from the generators, act like they're omnidirectional, even though their shaders don't say so. I don't yet know why that is.

  • Like 2

Share this post


Link to post
Share on other sites
Other sounds, like from the generators, act like they're omnidirectional, even though their shaders don't say so. I don't yet know why that is.

 

Do they have a minDistance of larger than 1? If so, they will sound omnidirectional inside that range.

Share this post


Link to post
Share on other sites
I included tdm_game01.pk4 and TheDarkMod.exe for Windows.

 

I just updated SVN and now TDM crashes every time I try to run a map. We don't have to move TheDarkMod.exe to the Doom3 folder anymore, do we?

Share this post


Link to post
Share on other sites

Do they have a minDistance of larger than 1? If so, they will sound omnidirectional inside that range.

 

Yes. I didn't know they became omnidirectional if the distance is less than the min distance. I'm not sure why that design choice was made.

Share this post


Link to post
Share on other sites

I just updated SVN and now TDM crashes every time I try to run a map. We don't have to move TheDarkMod.exe to the Doom3 folder anymore, do we?

 

No, it lives and runs in the darkmod folder.

 

Are you trying any map(s) in particular?

Share this post


Link to post
Share on other sites

I just committed an improvement to the sound stuff. This allows a sound path to recognize earlier that it can never reach the player, so it aborts earlier, saving some time.

 

A new TheDarkMod.exe is included, in darkmod rev 13328.

Share this post


Link to post
Share on other sites

I just updated SVN ...

 

For the record, my commit to darkmod only included these files:

 

tdm_game01.pk4

TheDarkMod.exe

def/misc.def

Share this post


Link to post
Share on other sites

I just updated SVN and now TDM crashes every time I try to run a map. We don't have to move TheDarkMod.exe to the Doom3 folder anymore, do we?

 

I had a similar issue last night Spring. I had changed my darkmod folder name to darkmod_svn awhile back because I had two installs side by side. I didn't think TheDarkMod.exe would crash if the dark mod folder name was different though, especially now that it runs inside our mod directory.

Share this post


Link to post
Share on other sites

Is it working for you now? I just updated again, but it's still crashing as soon as I try to start any map. I haven't renamed any folders.

Share this post


Link to post
Share on other sites

Is it working for you now? I just updated again, but it's still crashing as soon as I try to start any map. I haven't renamed any folders.

 

Yep, has been working fine for me after that. Not sure what could be happening on your end Spring. Config file woes?

Share this post


Link to post
Share on other sites

Is it working for you now? I just updated again, but it's still crashing as soon as I try to start any map. I haven't renamed any folders.

 

Can you offer any details on the crash?

 

My SVN tree is updated to the latest, and I played a few minutes each of Builders' Road, Chalice, and Outpost w/no problems.

Share this post


Link to post
Share on other sites
If several paths make it back to the player, the one with the highest volume at the player's position contributes its volume, but the virtual speaker's position is a weighted average of the most recent virtual speaker from each path. This way the volume doesn't jump up and down as you move. The position of the virtual speaker changes.

 

I understand. That sounds like a good way to tackle it. FWIW, it reminds me sometimes walking through a mazy area (in real life) the relative position of outside sounds coming in apparently moves around.

 

I've definitely noticed the omni-directional thing before; I think it's the same issue as this anyway, where you can't tell the direction of an AI at some point. That bewildered me then and it still does now. (I don't notice it as much now though.)


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

Share this post


Link to post
Share on other sites

@Spring:

 

If this file exists: darkmod/gamex86.dll, delete it and try again.

 

The engine will use that before extracting the DLL out of tdm_game01.pk4.

 

It might be that your setup is trying to run the new engine with an old DLL.

Share this post


Link to post
Share on other sites

That was the problem! Thanks, grayman. I have no idea why that file was back.

Share this post


Link to post
Share on other sites

I've just done a quick run through so far, but first impressions are that this is a massive improvement! The machine and window setup is especially impressive.

Share this post


Link to post
Share on other sites

Played a little more. One really cool thing I didn't notice at first was how the sound gradually changes depending on how wide the door is open. Subtle but very immersive!

 

Also, noticed that AI could use better reactions to seeing the player through a window...first they run up to the window and swing at you (one actually hit me through the wall), then they try to throw rocks through the window at you. :)

 

I did notice something odd on the second machine room with the two doors. When I left the first door closed and opened the second, there was a noticeable jump in sound when I stepped from the hall into the room with the machine. Is that intentional?

 

edit: Yes, when I open the first door and go in and out, it seems fine.

When I go in and out of the second door, there is a noticable jump in sound, regardless of whether the first door is open or closed.

If the second door is open, then I notice a smaller jump when I go in and out of the first door.

 

 

Lastly, in the hall with the breakable windows, there did seem to be a bit of 'jumping' in the volume as I moved from one broken window to another. I'll have to test that further to see what is going on.

 

edit: What are the orange buttons for btw? They didn't seem to do anything.

 

Ok, when I walk past the second breakable window (all windows unbroken atm) there is a definite jump in sound after two steps as I proceed down the hall towards the third window. There is also a slightly noticable jump in sound as I go the other way, towards the first window, just before reaching the buttons

 

The jump is much more noticable when the 2nd window has been broken (unrelated, but I can't seem to break the window with the bj. Takes 3 sword hits but only 1 arrow to do it?)

 

Are these just open portals that have a soundloss value on them?

Share this post


Link to post
Share on other sites

did notice something odd on the second machine room with the two doors. When I left the first door closed and opened the second, there was a noticeable jump in sound when I stepped from the hall into the room with the machine. Is that intentional?

 

Yes. The first door has a portal settings entity on it that has sound_loss = 6. This means you are going to experience an added loss to the door settings, whether the door is open or closed. With the second door closed, when you enter through the first door, you should notice a jump in volume.

 

The second door has a portal settings entity that has a sound_loss = 12. Ditto the behavior on the first door, but the sound jump is more noticeable when you enter the room.

 

Lastly, in the hall with the breakable windows, there did seem to be a bit of 'jumping' in the volume as I moved from one broken window to another. I'll have to test that further to see what is going on.

 

Those windows are separated by visportals across the hall, to separate the tests at each window. Each visportal has a portal settings entity providing sound loss.

 

edit: What are the orange buttons for btw? They didn't seem to do anything.

 

You can bring down the console and type "developer 1" to turn on helpful text messages that explain the settings at each test location. (As mentioned in the walkthrough file.)

 

The left button raises the volume through the window by 1dB and the right button lowers it by the same amount. You have to hit them several times in a row to hear any difference, since 1dB isn't that much.

Share this post


Link to post
Share on other sites

... unrelated, but I can't seem to break the window with the bj. Takes 3 sword hits but only 1 arrow to do it?)

 

True. I didn't investigate the damage amounts from each weapon. Separate discussion.

 

Are these just open portals that have a soundloss value on them?

 

Yes. See previous note.

Share this post


Link to post
Share on other sites

Well, then, everything seems to be working the way it is intended, and it sounds fantastic. Total win! :)

  • Like 2

Share this post


Link to post
Share on other sites

I actually wouldn't mind if the rock throwing was tuned down.

 

They pull a rock almost immediately from nowhere, then they keep throwing them every 3 seconds. At some point it gets a bit silly (usually by the time one ai has thrown 2-3 rocks. 5 ai throwing rocks.... Give up and walk away already... Or bend down and grab a rock off the ground or something! Yell -'And don't come back' ' chicken' ...


Dark is the sway that mows like a harvest

Share this post


Link to post
Share on other sites

I actually wouldn't mind if the rock throwing was tuned down.

 

They pull a rock almost immediately from nowhere, then they keep throwing them every 3 seconds. At some point it gets a bit silly (usually by the time one ai has thrown 2-3 rocks. 5 ai throwing rocks.... Give up and walk away already... Or bend down and grab a rock off the ground or something! Yell -'And don't come back' ' chicken' ...

 

Wrong thread?

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...