Jump to content
The Dark Mod Forums

Stopping sound through glass windows ?


Baddcog

Recommended Posts

I have my map vis portaled and sounds for zones. That all works.

 

But I have glass windows with visportals in them. They don't block sounds like guard footsteps, So I need to figure out how to close them for SFX, but not for vision.

 

Couldn't find anything searching wiki or forums.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

I tried this and was unsuccessful. (This was another reason I shut Damuddy's windows).

 

Now you can stop the sound of the player propogating to the AI; you do that with a spawnarg on an info_location_separator that you put over the visPortal (I forget just now, but it's somewhere in the wiki for locations; or just make a location_separator and look at its inhereted prop's). But the problem is that it doesn't stop the sound of an AI propogating to the player! Or it didn't for me. So I finally just made opaque windows and that did the trick (then got criticised for making windows that weren't half-open or transparent).

 

BTW, I do hope that spawnarg gets that functionality, because not only is that logically exactly the spawnarg you expect to do this job, but I think it's very important that the player can hear just what the AI can hear, or it's going to be misleading. You're going to hear the AI and think he hears you when he can't. So that spawnarg should work on propogation to the AI *and* to the player in the same way.

 

Edit: What about this spawnarg on the window?

loss_closed "Soundprop: Acoustical loss applied to sounds going thru the door/window when it is completely closed (default 15 dB)"

 

A visportal must be placed within the door if you want the door to have any effect on sound propagation when it opens/closes.

 

Or is the problem that with a transparent window the visPortal isn't actually closing?

 

Edit: Oh, well there's this:

http://wiki.thedarkmod.com/index.php?title=Sound_Propagation:_Part_1

 

Solid, unbreakable windows (and portal attenuation in general)

 

Suppose you have a transparent window looking outside from a room, that for whatever reason is not a breakable, func_fracture window. Because it's transparent, the renderer and consequently soundprop will view it as connected with the outside area. You'll have to do two things to get soundprop to attenuate souns when going through that unbreakable window.

 

1.Place a visportal in the window (you'll probably want to do this for performance reasons anyway). At this stage, soundprop will think it is a hole in the wall. It doesn't know about the window there blocking the sound.

2.Place an info_locationSeparator entity so that it's touching the visportal.

3.Set the portal attenuation value (again in dB) on the func_location_separator

Soundprop can use info_locationSeparator to make sound incur a certain loss when going through the portal it's touching. The key/value pair is the following:

 

sound_loss "Soundprop: Loss in dB incurred when a sound travels through this portal. Cumulative with door loss if a door is present."

The loss must be a positive number, and negative numbers will automatically be converted to positive.

 

The location separator you place to set sound loss at a portal doesn't have to be simultaneosly used to "properly" define a location, but it can be. In practice, you will probably be setting up some locations to take advantage of the ambient sounds and D3 EAX soundengine, and naturally you would have a different EAX environment for inside/outside areas, which requires different locations for these two places, so you would already want to put a visportal and location separator on transparent windows.

 

NOTE: Opaque windows don't need a visportal or any of this. They should already separate the inside and outside areas.

 

... But this may be what I mentioned at the beginning. (Although maybe my original problem is that it doesn't work on a naked visPortal like I was trying. You still need a window over it, though it can be a transparent one.)

 

Try it and see if it works, anyway.

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

BTW, I do hope that spawnarg gets that functionality, because not only is that logically exactly the spawnarg you expect to do this job, but I think it's very important that the player can hear just what the AI can hear, or it's going to be misleading. You're going to hear the AI and think he hears you when he can't. So that spawnarg should work on propogation to the AI *and* to the player in the same way.

Unfortunately, D3's sound engine is closed-source and doesn't have all the capabilities of the soundprop routine used by the AI, which makes it difficult to have the behaviour of player-heard sounds match up with the behaviour of AI-heard sounds. e.g. The volume heard by the player is specified separately from the volume heard by the AI.

 

There's not a lot we can easily do about this before D3 goes open source.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

Too bad I guess, I tried the sound_loss prop at 1 and 60, doesn't seem to work at all. In fact at some point I broke my sound zones so I gotta clean that up now. Was worth a try though.

 

Guess I'm gonna go opaque with windows which is alright, it'll help performance anyway and the benefit of semi-opaque windows was minmal views.

Dark is the sway that mows like a harvest

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

    • nbohr1more

      The Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 2 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 1 reply
    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 4 replies
×
×
  • Create New...