Jump to content
The Dark Mod Forums

Using sound_loss on visportals


Springheel

Recommended Posts

Does anyone have experience with using info_locationseparators to increase sound loss for a visportal? I followed the directions from the wiki:

 

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 info_locationseparator.

 

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."

 

But as far as I can tell there is no impact on the sound coming through the opening.

Link to comment
Share on other sites

  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Need details.

 

What's the sound?

 

Where's it located? How far from the visportal?

 

Where are you when you're listening to the sound?

 

Sound reduction changes the min and max radii for the sound. If you're inside the reduced min radius, you'll still hear the sound at max volume.

Link to comment
Share on other sites

Sound reduction changes the min and max radii for the sound. If you're inside the reduced min radius, you'll still hear the sound at max volume.

 

Interesting, so I guess that means that the spawnarg documentation is incorrect? It isn't a loss in dB, but an increase in distance.

Link to comment
Share on other sites

The sounds are footsteps, so there is no minimum distance.

 

Hmm. I just realized that maybe the method I was trying only works for sound propagated to AI, not sound going to the player. The wiki article isn't really clear:

 

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

 

Here's the situation I want to solve...I have a room with a hole in the floor, and a guard patrolling underneath in the basement. The hole has a visportal in it, but it still sounds like the basement guard is right in the same room with you when he walks around. I was hoping to increase the sound loss when it goes through the portal so the basement guard couldn't be heard so clearly.

Link to comment
Share on other sites

All I can think of is to put multiple visportals inside the hole, with a single info_locationseparator touching all of them.

 

Hopefully the code will register the separator with each visportal and apply its sound reduction to each.

 

Since visportals are just a plane, I assume they can be as little as 0.125 apart.

Link to comment
Share on other sites

Will that reduce sound to the player, though? I'm now thinking that the wiki page is talking about reducing sound to AI only...the section on doors definitely does not apply to the player-heard sounds.

 

I think I got confused by the fact that he talked about EAX sound in the same section.

 

There's got to be some way to reduce the volume of sounds getting to the player though.

Link to comment
Share on other sites

Hmm. I just realized that maybe the method I was trying only works for sound propagated to AI, not sound going to the player.

 

This is right. It just affects to-AI propagation.

People keep suspecting to-player might get in there somewhere, but we keep re-confirming every time it's just for AI.

 

There was a thread around somewhere where we were brain-storming alternatives and maybe new spawnargs for players. It's something we need eventually I think (a new feature on visPortals), since the problem comes up in so many situations, windows, holes, odd-shaped rooms. I sympathize with your disbelief; but AFAIK there isn't any way to modulate volume to-player that we've found except through EAX (which of course muffles everything, and even then isn't universally applied).

 

Some ideas we tossed around -- Conditionally modulate the bark at its source? ... complicated. Creative use of a door when the player isn't in direct view of the hole? Also unsatisfying.

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

This is right. It just affects to-AI propagation.

People keep suspecting to-player might get in there somewhere, but we keep re-confirming every time it's just for AI.

 

 

I have a test map I made when we were talking about this. It's a long hall (1536) with visportals every 256. At one end of the hall I have a looping speaker playing "gregorian01a" and I set the min/max distances to 1888 and 1968. (The spawnargs are 48 & 50.)

 

Each vp has an info_locationseparator on it, each with "sound_loss" set to "100".

 

Each vp has a func_portal on it.

 

Cases:

 

A - set "portal_dist" to "2560" on each func_portal

 

This keeps each vp open as I walk down the hall. I get to the far end of the hall (away from the speaker) and I'm hearing full volume from the speaker, because my distance is less than the min distance (1536 < 1888).

 

B - set "portal_dist" to "256" on each func_portal

 

Now the visportals close behind me as I walk away from the speaker. When the third visportal shuts behind me, the sound cuts off. If I turn back toward the speaker and take a couple steps, visportal #3 opens and the sound comes back. Step back, vp closes, sound gone.

 

So open visportals with info_locationseparators have no effect on what the player hears.

 

But closed visportals with info_locationseparators do.

Link to comment
Share on other sites

I was talking specifically about the "sound_loss" spawnarg on info_locations not applying to to-player sounds, not visPortal sound-propagation generally.

 

But sound propagation to the player most definitely uses the visPortal system, as your experiment just indicated, and as we know from that wiki chart of VPs on corners with red-lines (of sound) going through them, and when you turn on show-sound-prop, you can literally see the sound-line going from the AI, to a VP, to the player. Propagation goes through the middle of visPortals, through in-leaf walls if it has to, and when a VP closes, light and sound to the player both cut off through the VP. So re: "closed visportals with info_locationseparators do [affect the player]": yes, that's right. (I also assumed this effect in my suggestion for creative use of doors or VP blocking as a hack fix.)

 

What isn't affected, though, is the sound_loss to player when it's open. And the only way to get it (I think) would be to get into the visPortal or info_location code itself and change the to-player sound-prop code directly to reduce the sound there, which I think is still closed source isn't it? (I actually wrote a paragraph on that in my post above, but then I deleted it because it was long.)

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

So open visportals with info_locationseparators have no effect on what the player hears.

 

But closed visportals with info_locationseparators do.

 

Ok, then I'm using it wrong, because the visportal was closed in some cases, yet I could still hear the AI fully.

 

I'll try it with the two visportals, like you mentioned, and see what happens.

Link to comment
Share on other sites

No, that doesn't work either. I tried creating two visportals close together and having a single info_locationseparator touching them both. I set the sound loss to an extreme level (500) but it had no effect. I'm not sure I'm doing it right though. Maybe the visportal isn't closing.

 

Each vp has a func_portal on it.

 

What is this for, btw? I don't have one of those.

Link to comment
Share on other sites

What is this for, btw? I don't have one of those.

 

You use func_portals to turn visportals on and off based on their distance from the player.

 

It's useful if you have a vp in the distance (i.e. a window) when there's no point in showing what's behind it because it's so far away.

 

Mostly used in outside areas.

 

Check the tower windows in the training map's arrow-shooting range.

Link to comment
Share on other sites

What isn't affected, though, is the sound_loss to player when it's open. And the only way to get it (I think) would be to get into the visPortal or info_location code itself and change the to-player sound-prop code directly to reduce the sound there, which I think is still closed source isn't it? (I actually wrote a paragraph on that in my post above, but then I deleted it because it was long.)

 

It sounds like the main problem is that merely tracing distance through chains of portals is too naïve, because it assumes portals are generally the same size. In real life a small hole between two rooms would attenuate sound considerably, which I think is the situation Sprinheel is describing; but the Doom 3 sound-propagation code is not taking portal area into account.

 

And I think you are right that this cannot easily be fixed without the Doom 3 source.

Link to comment
Share on other sites

You use func_portals to turn visportals on and off based on their distance from the player

 

Ah, ok, I'll use that to force the visportal closed and see if that works. The player can't look down the hole until they're nearly on top of it anyway.

Link to comment
Share on other sites

Yes, I can confirm that this works. As long as the portal is closed, the sound is cut off. Given the setup, I'm able to close the visportal until the player is fairly close, at which point the sound isn't such a problem, so that should be enough for me in this case.

 

It would still be nice if would could get sound_loss to work regardless of whether the portal was open or closed.

Link to comment
Share on other sites

It would still be nice if would could get sound_loss to work regardless of whether the portal was open or closed.

 

Being able to set an 'open' and 'closed' sound_loss setting for doors and windows would also be beneficial.

 

Not using any real numbers here, but just for an example...a portal placed within a door frame might have a loss of say...10...and when the door is closed, that loss is bumped to 40.

 

It would be helpful if the visportal creation in Darkradiant has some default 'size based' setting. If a mapper created a brush, and textured it with visportal, depending on the size...DR could automatically assign an open snd_loss and closed snd_loss...up to a certain size...once you get so big, it really wouldn't matter.

 

For a visportal brush with no door, both of those settings would the same number, but the addition of a door could then override the default sound_loss by adding an extra amount to what is already there.

 

No idea if any of that is possible, but if the sound_loss can be made to work...it probably wouldn't be too far of a stretch to achieve the rest.

Link to comment
Share on other sites

So to be clear on this, all sound is cutting off *entirely* when you force the VP closed, right?

 

This is opposed to the sound_loss working (for to-player sound propagation) when the VP is closed but not when it's open (so it attenuates sound when the VP is closed, but doesn't stop sound entirely)*, which might be one way to interpret what you said, but I don't think so -- you wouldn't have said "cut off" in that case, and I understood that sound_loss wasn't working for to-player sound prop ever, open or closed.

 

* I thought about this because don't closed-doors close VPs but also allow some sound through, through the loss_closed spawnarg? But this may be a custom-built situation so the analogy to VP'd holes & transparent windows might not apply.

 

Edit: BTW I thought it'd be a good idea to update the wiki on these issues too, and then thought I may as well take the initiative (since sometimes it doesn't get done if not right away), but now I look at it and think it could explain things better, like how the alternative to cut off the func_portal with distance works in a sentence.

 

Anyway, here it is if anyone wants to do that: http://wiki.thedarkmod.com/index.php?title=Sound_Propagation:_Part_1#Solid.2C_unbreakable_windows_.28and_portal_attenuation_in_general.29

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

So to be clear on this, all sound is cutting off *entirely* when you force the VP closed, right?

 

It is, but I had the sound_loss up to a ridiculous level, like 500. Worth testing to see what happens when it's a reasonable level.

Link to comment
Share on other sites

Nuts. Looks like it is all or nothing. If you force the visportal closed, then no sound gets through at all, regardless of what the sound_loss value is.

 

That's far less useful, but I guess it will have to do.

Link to comment
Share on other sites

sound_loss only affects AI sound, not player sound you can hear.

 

Forcing a portal open or closed presumably uses D3's "door loss" to affect audible sound, which is a value we can change, but it's the same for all portals across the map (until the sound engine source is released and we can change it).

Link to comment
Share on other sites

sound_loss only affects AI sound, not player sound you can hear.

 

Forcing a portal open or closed presumably uses D3's "door loss" to affect audible sound, which is a value we can change, but it's the same for all portals across the map (until the sound engine source is released and we can change it).

 

From what spring is describing though, it sounds like forcing it closed it cancelling all sound.

Link to comment
Share on other sites

From what spring is describing though, it sounds like forcing it closed it cancelling all sound.

 

sounds like natural tdm behavior to me. recall coming up to a closed door where you want to know whats on the other side. theres some loud stuff going on the other side. you won't hear anything unless you lean against the door. most other times you don't really get close enough to a closed portal (unless your walking backwards) to really notice this effect. Perhaps this is a potential source of player aggravation with not being able to hear AI footsteps?

 

But, then again, if i am working though a corridor, and i pass through a visportal and stop, the portal is now behind me, i'm facing away from it, it is closed. An AI walks up behind me "HEY WHOS THAT THAR?!" will this really be impossible to hear? I doubt it. If that is the case, apparently i pay a lot less attention to sound than i thought i did.

Link to comment
Share on other sites

sounds like natural tdm behavior to me. recall coming up to a closed door where you want to know whats on the other side. theres some loud stuff going on the other side. you won't hear anything unless you lean against the door.

 

I know doors will reduce the sound heard by the player, but it's not supposed to completely cancel. It's only when portals are forced shut that the sound_loss setting seems to be getting ignored.

 

If we can find a way to force the sound_loss on mapper defined portals, it would be a huge help.

Link to comment
Share on other sites

as portals are worldspawn it seems the most intuitive solution would be to modify the behavior based on entities that intersect them. an entire redesign of the portal system even if d3 goes opensource seems too much like reinventing the wheel. *

 

edit: *and would break maps to boot

Edited by ungoliant
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

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 6 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...