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

Visportals that can decrease sound

Recommended Posts

The editor comment for the location separator's "sound_loss" says that the value is added to any sound losses defined on a door.

 

However, as I reported above, this doesn't happen. The "sound_loss" value is ignored.

 

If I correct this, the following missions are affected, and I want to know if anyone cares:

 

Alberic's Curse

 

A separator on the door to the shed provides additional loss of 10, so when the door is closed, the total sound loss would now be 20 instead of 10. No change to the sound loss when the door is open, because the separator won't contribute. Edit - based on what Springheel said below, the "sound_loss" would be expected to contribute even when the door was open, so the loss with the door open would now be 11 instead of 1.

 

Ditto for a separator on the secret door in the crypts.

 

Patently Dangerous

 

Separators on two windows provide additional losses of 20, so when the window is closed, the total sound loss would now be 30 instead of 10. No change to the sound loss when the window is open, because the separator won't contribute. Edit - based on what Springheel said below, the "sound_loss" would be expected to contribute even when the window was open, so the loss with the window open would now be 21 instead of 1.

Share this post


Link to post
Share on other sites
Could you please review your use of "sound_loss" on location separators 1, 2, & 4 in A Score to Settle?

 

These guys aren't on doors.

 

What were you expecting to happen at those points? Sound loss whether they were open or closed? Only when closed?

 

What I wanted to have happen was to decrease the amount of sound that went through the portal to AI when it was open. But I suspect that it didn't actually do that.

Share this post


Link to post
Share on other sites

What I wanted to have happen was to decrease the amount of sound that went through the portal to AI when it was open. But I suspect that it didn't actually do that.

 

Yes, the sound was occluded whether the portal was open or closed. I'm not sure what the original designer was smoking, but this is how it was implemented.

 

This complicates things. (As if this problem could get more complicated.)

Share this post


Link to post
Share on other sites

I finally found an explanation for the existence of sound_loss on location separators.

 

On this wiki page, a section entitled Solid, unbreakable windows (and portal attenuation in general) describes placing a separator on a transparent, non-openable window, and using sound_loss to simulate occlusion.

 

So sound_loss was probably originally designed to be used on portals whether they were open or closed, to solve the problem of AI sound propagation through closed transparent windows.

 

Though sound_loss wasn't designed to be used on true openings, nothing prevents it from being used that way.

Share this post


Link to post
Share on other sites
Yes, the sound was occluded whether the portal was open or closed. I'm not sure what the original designer was smoking, but this is how it was implemented.

 

I don't quite understand. Isn't that what we want for the "small hole in the basement" issue, to have occlusion regardless of whether the portal is open or closed? I thought the only problem was that it didn't also affect player sound.

Share this post


Link to post
Share on other sites

True, but I wouldn't do that with a location separator. I'd use the new entity for that, because it doesn't carry the baggage of defining a location boundary.

 

Occlusion for small openings makes sense, but not for large openings.

Share this post


Link to post
Share on other sites

I guess it would be nice to have a separate entity (not a loc. sep.) to handle this. But would also be nice to have the function on location separators. Some authors may not want to use zones (though it's a pretty nice system). But if they are using zones it would be nice to just include it in the existing entities.


Dark is the sway that mows like a harvest

Share this post


Link to post
Share on other sites

One bit of success: I've worked out how to convert the AI's sound loss in dB to an occlusion distance for player-heard sound.

 

This is the first step toward using one set of spawnargs for sound loss on both AI and the player.

Share this post


Link to post
Share on other sites

When a sound with a large minDistance flows through a closed door with a loss of 10dB (the default), it's probable that the sound will remain at max volume because the occlusion distance added to the "sound traveled" isn't enough to get past the minDistance when calculating the resulting volume. This makes the sound play at full volume, even through a closed door.

 

My expectation is that the volume would be diminished across the door, regardless of min and max distances.

 

Could folks comment on what their expectation is? (In existing maps, the sound doesn't diminish.)

Share this post


Link to post
Share on other sites

Sounds generally should not have a large minDistance, as it messes with both occlusion and direction (you can't tell what direction a sound is coming from if you are inside the minDistance range).

 

My expectation is that the volume would be diminished across the door, regardless of min and max distances.

 

Agreed.

Share this post


Link to post
Share on other sites

I second that. The only effect the minimum sound distance should have on the sound occlusion is that it may lessens the effect a bit.

Sounds generally should not have a large minDistance

I guess most mappers used this for ambient sounds like wind or so. Personally I prefer the zone system, so I don't use sounds with large minimum distances and would second that, too.


FM's: Builder Roads, Old Habits, Old Habits Rebuild

WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Share this post


Link to post
Share on other sites

The long minDistance problem is solved.

 

-----------------------------------------

 

@Spring, do you have a copy of that "little hole in the floor" test map that we were discussing so long ago?

 

If not, I'll make up something based on what I remember about that discussion: player on upper floor, patrolling guard on lower floor, and his footsteps much too loud regardless of where the player or the guard are. Is that right?

  • Like 1

Share this post


Link to post
Share on other sites

Now working: Graduated volume increase when opening a door, and graduated volume decrease when closing a door.

  • Like 1

Share this post


Link to post
Share on other sites
@Spring, do you have a copy of that "little hole in the floor" test map that we were discussing so long ago?

 

 

Here's a quick and dirty version.

 

 

 

Version 2

// entity 0

{

"classname" "worldspawn"

"editor_drLastCameraPos" "-400.71 -66.0526 32"

"editor_drLastCameraAngle" "-40.5 120.3 0"

// primitive 0

{

brushDef3

{

( 0 0 1 -72 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

( 0 1 0 -64 ) ( ( 0.0078125 0 0.09375 ) ( 0 0.0078125 255.8125 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

( 1 0 0 448 ) ( ( 0.0078125 0 0.3125 ) ( 0 0.0078125 255.8125 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

( 0 -1 0 -104 ) ( ( 0.0078125 0 15.8203125 ) ( 0 0.0078125 255.8125 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

( -1 0 0 -512 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 255.8125 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

( 0 0 -1 60 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

}

}

// primitive 1

{

brushDef3

{

( 0 0 1 -256 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( 0 1 0 -64 ) ( ( 0.0078125 0 0.09375 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( 1 0 0 128 ) ( ( 0.0078125 0 0.0625 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( 0 0 -1 -64 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( -1 0 0 -512 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( 0 -1 0 60 ) ( ( 0.0078125 0 0.09375 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

}

}

// primitive 2

{

brushDef3

{

( 0 0 1 -256 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( 0 1 0 -64 ) ( ( 0.0078125 0 0.09375 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( 1 0 0 128 ) ( ( 0.0078125 0 0.0625 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( 0 0 -1 -64 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( 0 -1 0 -128 ) ( ( 0.0078125 0 15.8203125 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( -1 0 0 -132 ) ( ( 0.0078125 0 0.0625 ) ( 0 0.0078125 1 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

}

}

// primitive 3

{

brushDef3

{

( 0 1 0 -64 ) ( ( 0.0078125 0 0.09375 ) ( 0 0.015625 0 ) ) "textures/darkmod/metal/detailed/beam_rivets_greypaint" 0 0 0

( 1 0 0 128 ) ( ( 0.0078125 0 0.0625 ) ( 0 0.015625 0 ) ) "textures/darkmod/metal/detailed/beam_rivets_greypaint" 0 0 0

( 0 0 -1 -64 ) ( ( 0.0078125 0 0 ) ( 0 0.015625 0 ) ) "textures/darkmod/metal/detailed/beam_rivets_greypaint" 0 0 0

( 0 -1 0 -128 ) ( ( 0.0078125 0 15.8203125 ) ( 0 0.015625 0 ) ) "textures/darkmod/metal/detailed/beam_rivets_greypaint" 0 0 0

( -1 0 0 -512 ) ( ( 0.0078125 0 0 ) ( 0 0.015625 0 ) ) "textures/darkmod/metal/detailed/beam_rivets_greypaint" 0 0 0

( 0 0 1 60 ) ( ( 0.0078125 0 0 ) ( 0 0.015625 0 ) ) "textures/darkmod/metal/detailed/beam_rivets_greypaint" 0 0 0

}

}

// primitive 4

{

brushDef3

{

( 0 0 1 -256 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( 1 0 0 128 ) ( ( 0.0078125 0 0.0625 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( 0 0 -1 -64 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( 0 -1 0 -128 ) ( ( 0.0078125 0 15.8203125 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( -1 0 0 -512 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( 0 1 0 124 ) ( ( 0.0078125 0 15.8203125 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

}

}

// primitive 5

{

brushDef3

{

( 0 0 1 -256 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( 0 1 0 -64 ) ( ( 0.0078125 0 0.09375 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( 0 0 -1 -64 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( 0 -1 0 -128 ) ( ( 0.0078125 0 15.8203125 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( -1 0 0 -512 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

( 1 0 0 508 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 1 ) ) "textures/darkmod/stone/brick/blocks_lime_smooth" 0 0 0

}

}

// primitive 6

{

brushDef3

{

( 0 0 1 -72 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 255.96875 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

( 0 1 0 -64 ) ( ( 0.0078125 0 0.125 ) ( 0 0.0078125 255.8125 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

( 1 0 0 124 ) ( ( 0.0078125 0 0.0625 ) ( 0 0.0078125 255.8125 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

( 0 -1 0 -128 ) ( ( 0.0078125 0 15.7890625 ) ( 0 0.0078125 255.8125 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

( -1 0 0 -448 ) ( ( 0.0078125 0 255.96875 ) ( 0 0.0078125 255.8125 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

( 0 0 -1 60 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0.03125 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

}

}

// primitive 7

{

brushDef3

{

( 0 0 1 -72 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/editor/visportal" 0 0 0

( 0 1 0 104 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/common/nodraw" 0 0 0

( 1 0 0 448 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/common/nodraw" 0 0 0

( 0 0 -1 68 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/common/nodraw" 0 0 0

( 0 -1 0 -124 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/common/nodraw" 0 0 0

( -1 0 0 -508 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/common/nodraw" 0 0 0

}

}

// primitive 8

{

brushDef3

{

( 0 0 1 -268 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

( 0 1 0 -64 ) ( ( 0.0078125 0 0.09375 ) ( 0 0.0078125 1.34375 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

( 1 0 0 124 ) ( ( 0.0078125 0 0.0625 ) ( 0 0.0078125 1.34375 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

( 0 -1 0 -128 ) ( ( 0.0078125 0 15.8203125 ) ( 0 0.0078125 1.34375 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

( -1 0 0 -512 ) ( ( 0.0078125 0 255.9375 ) ( 0 0.0078125 1.34375 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

( 0 0 -1 256 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/wood/boards/planks_wood_large_worn_rough_bright" 0 0 0

}

}

}

// entity 1

{

"classname" "atdm:ai_guard_generic_01"

"name" "atdm_ai_guard_generic_01_1"

"origin" "-454 -7 -44"

"target0" "path_corner_1"

}

// entity 2

{

"classname" "path_corner"

"name" "path_corner_1"

"origin" "-168 -36 -52"

"target0" "path_corner_2"

}

// entity 3

{

"classname" "path_corner"

"name" "path_corner_2"

"origin" "-476 -96 -56"

"target0" "path_corner_1"

}

// entity 4

{

"classname" "info_player_start"

"name" "info_player_start_1"

"origin" "-176 16 76"

"angle" "90"

}

// entity 5

{

"classname" "light"

"name" "light_1"

"origin" "-328 -32 192"

"light_center" "0 0 0"

"light_radius" "320 320 320"

}

 

 

Share this post


Link to post
Share on other sites

Now working: Graduated volume increase when opening a door, and graduated volume decrease when closing a door.

 

Nice, I don't know if this can be tied in in anyway shape or form but I suppose there could be shared code...

 

Has to do with textures in 1.08. Discussed it with Tels a bit but that's as far as it went i believe. is probably a bug tracker for it.

basically i made some new window skins, yellow lit for outside and blue moonlit for inside. they open like doors, but it's very weird to have the glass still lit like that when open. The point was to have the glass texture fade to a neutral unlit white texture when fully open.

 

Do you think that's something you can get working? it would be great for opaque windows. even with the sound fix there are going to be times when transparent windows just aren't plausible for performance reasons.


Dark is the sway that mows like a harvest

Share this post


Link to post
Share on other sites

Here's a quick and dirty version.

 

I put a location separator on the portal, and varied the sound_loss from 5.0 to 20.0.

 

Standing at the opposite end of the room from the hole, I can hear the sound of his footsteps drop off a little at 5.0, and more at the higher settings. The maxdistance on the footstep is 30m, so it's going to travel pretty far.

 

At 20.0, and standing far from the hole, I can barely hear him when he's under me, and reasonably well when he's under the hole.

 

I can't hear his jangling at all when at the far side of the room, and can hear it easily when standing over the hole.

 

So I think this is working.

  • Like 1

Share this post


Link to post
Share on other sites

Nice, I don't know if this can be tied in in anyway shape or form but I suppose there could be shared code...

 

Has to do with textures in 1.08. Discussed it with Tels a bit but that's as far as it went i believe. is probably a bug tracker for it.

basically i made some new window skins, yellow lit for outside and blue moonlit for inside. they open like doors, but it's very weird to have the glass still lit like that when open. The point was to have the glass texture fade to a neutral unlit white texture when fully open.

 

Do you think that's something you can get working? it would be great for opaque windows. even with the sound fix there are going to be times when transparent windows just aren't plausible for performance reasons.

 

I suppose the skin on the window would have to gradually change color, or maybe some factor embedded in the texture definition. I suppose it's possible.

 

The framework of having the window think and know how open it is, and how that changes as it moves, is now in place, so the only bit missing would be the gradual texture change.

 

Edit: I don't see any "morphing" code for skins. The code simply slaps a new skin on the entity. Maybe Tels knows how to morph one skin into another over time. Maybe overlay one skin over another, and fade one in and one out?

Share this post


Link to post
Share on other sites

Ah cool. yeah I'm not sure, he may have mentioned using color_me prop instead of skins.


Dark is the sway that mows like a harvest

Share this post


Link to post
Share on other sites

Isn't there something like an alpha setting in the shader definitions? Can this value be changed during game? This would be my approach. The "closed" texture over the "openend" and then increase the alpha of the first to 1 during open.


FM's: Builder Roads, Old Habits, Old Habits Rebuild

WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Share this post


Link to post
Share on other sites

hmm, well that would require adding more planes to the model which I don't want to do at this point. Though it might be one way to go.


Dark is the sway that mows like a harvest

Share this post


Link to post
Share on other sites

A door has these settings by default:

 

loss_open - 1

loss_closed - 10

loss_double_open - 1

 

I find that loss_double_open isn't necessary when dealing with double doors. The only time the code uses the value is if one door is open and the other door is closed. But I can assign a loss on the shared portal by using loss_open and loss_closed from the doors.

 

Since no one has used this spawnarg in released maps, does anyone have a problem with doing away with it? I'll ask the campaign guys too.

Share this post


Link to post
Share on other sites

Fids has it all over one of his campaign maps, so I need to work out his intentions and how they mesh with what I'm trying to do.

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