View Issue Details

IDProjectCategoryView StatusLast Update
0003042The Dark ModSound Systempublic01.04.2013 21:52
ReporterNew Horizon Assigned Tograyman  
Status resolvedResolutionfixed 
Product VersionSVN 
Target VersionTDM 2.00Fixed in VersionTDM 2.00 
Summary0003042: Open visportals do not propagate sound loss to player.
DescriptionAs discussed in this thread...

The method discussed in the thread only works for sound propagated to AI. Until the arrival of the source code, we had no way to add similar functionality for what the player hears.

Ideally, we would want there to be a sound loss to the player whether the portal was open or closed, perhaps even with some rough automatic approximation for what the loss should be so that the mapper doesn't have to set it on each portal manually.
Steps To ReproduceSpringheel was attempting to solve the following issue.

"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. "
Additional InformationOrbweaver:

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


"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). "
TagsNo tags attached.




29.01.2013 21:34

administrator   ~0005036

Last edited: 17.02.2013 19:22

View 2 revisions




06.02.2013 18:27

administrator   ~0005052

The previous note is incorrect. A portal closed with a func_portal provides a default occlusion distance of 450. This might be enough to silence sounds with small radii, but the ones with larger radii can still be heard, though they're more quiet.


16.02.2013 02:34

administrator   ~0005065

1 – Changed the way sound reaches the player. Instead of using a distance-based method to determine sound loss across portals, use a dB-based method. Discard the fixed occlusion amount across portals with varying occlusion based on door sound loss spawnargs, location separators, and portal settings entities.

2 – Created a portal settings entity that acts like a location separator w/o creating a location boundary. It carries a sound loss spawnarg that can be applied to AI-heard sounds only, Player-heard sounds only, or both.

3 – Allowed visportals to touch doors with the addition of a new spawnarg, “transparent”. This keeps the portal from closing when the door closes. This allows us to use location separators and portal entities to add further adjustments to sound loss across portals.

4 – Allowed sound loss across an opening or closing door to vary based on the size of the opening. To the player, any sounds coming through an opening door will increase in volume, and decrease as the door closes.

5 – Fixed the “text” entity so it can use the “developer” mode to show its text. The docs said you could toggle the text on and off by toggling the developer mode, but it didn’t work.

6 – Fixed a problem with hearing sound while sitting on the “Player Ready” screen at the start of a mission. Sounds were starting before the player hit the attack button, which caused nearby sounds to be heard through portals, whose occlusion values weren’t set up until a few frames after the attack button was pressed. Fix was to delay starting sounds until after the occlusion values were installed on the portals.

7 – Allowed scripts to adjust the sound loss on portal entities and location separators.

8 – Fixed a bug in a method that determined how “open” a door was. The method only worked for doors opening counter-clockwise, but gave strange results for doors opening clockwise.

9 – Fixed a bug that was occluding sound on a visportal closed by a func_portal. Now no occlusion occurs, allowing sounds to pass through these closed portals without losing volume.

10 – Allow open visportals to occlude sound if they have a touching location separator or portal settings entity. This lets mappers muffle sounds through smaller openings that otherwise would come through loud and clear.

rev. 5695:


rev. 13326:


Also committed a test map, “playersound” for testing. Read playersound.txt for a walkthrough.


16.02.2013 19:26

administrator   ~0005068

Committed a change to reduce the amount of time spent finding sound paths from a speaker to the player.

rev. 5696



14.03.2013 18:02

administrator   ~0005177

Last edited: 14.03.2013 19:55

View 2 revisions

Next round …

Add 10dB loss to doors for player only. This brings sound volumes through doors more in line with what they were before the sound changes were made.

rev. 5711:


And rev. 5713:




01.04.2013 21:52

administrator   ~0005281

Next round …

Adjustment to sound passing through an opening door so that it reaches full volume at the 50% open position instead of a 100% open position.

rev. 5732:


Issue History

Date Modified Username Field Change
02.03.2012 13:31 New Horizon New Issue
29.01.2013 21:34 Springheel Note Added: 0005036
06.02.2013 18:27 grayman Note Added: 0005052
06.02.2013 18:27 grayman Assigned To => grayman
06.02.2013 18:27 grayman Status new => assigned
16.02.2013 02:34 grayman Note Added: 0005065
16.02.2013 02:34 grayman Status assigned => resolved
16.02.2013 02:34 grayman Resolution open => fixed
16.02.2013 02:34 grayman Fixed in Version => TDM 2.00
16.02.2013 02:34 grayman Target Version => TDM 2.00
16.02.2013 19:26 grayman Note Added: 0005068
17.02.2013 19:22 Springheel Note Edited: 0005036 View Revisions
14.03.2013 18:02 grayman Note Added: 0005177
14.03.2013 19:55 grayman Note Edited: 0005177 View Revisions
01.04.2013 21:52 grayman Note Added: 0005281