View Issue Details

IDProjectCategoryView StatusLast Update
0003413The Dark ModSoundpublic30.07.2013 03:36
Reportertels Assigned ToSpringheel  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 1.08 
Target VersionTDM 2.00Fixed in VersionTDM 2.00 
Summary0003413: Swimming and splashing (jump into water) do not propagate sound to AI
DescriptionIf you walk of a ledge and fall 2m down into water, the only sound the AI "hears" is the last footstep on the edge.

While swimming might make only very little noise (after all you are a thief), falling into water should at least be heard by an AI standing next to you.
Additional InformationFrom Dragon's Claw, walking over ledge into canal:

PROPAGATING: From entity player1, sound "footstep_default_walk", volume modifier -3.600000, duration modifier 1.000000
Propagation volume: 39.00 Range: 287.96 units (7.31 m)
Found 50 valid AIs to propagate to
AI atdm_ai_builder_guard_3 is not within propagation cutoff range 287.96
[...]
Propagated sound footstep_default_walk to AI atdm_ai_proguard_1, from origin 1682.18 -1293.92 -538.65 : Propagated volume 8.468948, Apparent origin of sound: 1682.18 -1293.92 -538.65
idAudioHardwareALSA::Write: 809 frames overflowed and dropped
UNDERWATER: After water check overlay is guis\underwater\underwater_green_thinmurk.gui

Then you are in water and completely inaudible.

TagsNo tags attached.

Activities

tels

tels

14.05.2013 18:25

reporter   ~0005458

Additional info, including where to fix this:

http://forums.thedarkmod.com/topic/14803-questions-about-20/page__view__findpost__p__311378
tels

tels

14.05.2013 18:27

reporter   ~0005459

Moveables hitting water propagate no sound, either. Dropping a crate into water is completely silent to the AI (unless the crate hits the floor below the water).
Springheel

Springheel

17.05.2013 21:25

administrator   ~0005480

Last edited: 02.06.2013 13:19

"The code to look for is in Liquid::Collide "

Not sure exactly where to look for this. I found a spwanarg that sets the particle effect for collisions with water (func_liquid) but nothing about sounds.

grayman

grayman

20.07.2013 23:49

viewer   ~0005841

Last edited: 20.07.2013 23:51

For dropping things into water and having a sound propagate to AI, we need a definition for

sprS_water

for everything that can be dropped into water.

I can default this to be the same as sprS_bounce, but wondered if there were other, better, ideas.

I suppose these spawnargs also have to be considered:

"editor_var spr_object_size" "Used to calculate propogated sound to AI. Set as either small, medium or large. Defaults to medium."

"editor_var spr_object_hardness" "Used to calculate propogated sound to AI. Set as either soft or hard. Defaults to hard."

grayman

grayman

21.07.2013 00:20

viewer   ~0005842

The footstep splash sound propagation alerting AI is working. Probably as a result of my previous footstep changes.

Falling into water is propagated to the AI. This was already working.

Weapons are lowered when swimming, but would appear if you rise up high in the water, but not mantling out. The code thought you were walking through a puddle, and brought the weapon back up. When you sank back down, the weapon disappeared again, so the effect was weapon lowered, weapon raised, weapon lowered, etc. as you swam along the water surface. Easy fix.
Springheel

Springheel

21.07.2013 00:42

administrator   ~0005843

Last edited: 21.07.2013 00:50

Movables all have "spr_object_size" and "spr_object_hardness" spawnargs. Somehow the code then takes these and selects the proper propagated impact sound, such as

"entityDef sprGS_bounce_small_hard_on_soft"

"small" and "hard" come from the movable entity. Somewhere, there must be a def file that assigns material surfaces as either "hard" or "soft".

Could we just add "water" to that list?

edit:
"The code thought you were walking through a puddle, "

  btw, there are two different entries for player footsteps. There is "sprS_footstep_puddle" and "sprS_footstep_wading" At the moment they just use the same sound, but can the code distinguish between the two?

grayman

grayman

21.07.2013 00:59

viewer   ~0005844

"there are two different entries for player footsteps. There is "sprS_footstep_puddle" and "sprS_footstep_wading" At the moment they just use the same sound, but can the code distinguish between the two?"

Yes. 'puddle' is used when the water level is from the feet to the waist, and 'wading' is used when it's higher than the waist but below the eyes.

"Could we just add "water" to that list?"

We could create "sprGS_splash_small", "sprGS_splash_medium", and "sprGS_splash_large", ignoring soft/hard differences. If we had those, the code would just use "spr_object_size" to pick the right sound.
Springheel

Springheel

21.07.2013 01:05

administrator   ~0005845

Ok. I don't suppose the hardness of the object matters that much when it's falling into water. I'll see to it.
grayman

grayman

21.07.2013 02:11

viewer   ~0005847

The code is written. It's looking for

sprGS_splash_small
sprGS_splash_medium
sprGS_splash_large

in tdm_propagated_sounds.def.
Springheel

Springheel

21.07.2013 14:39

administrator   ~0005849

Last edited: 21.07.2013 14:40

Done. Used these values for now.

sprGS_splash_small -- 40
sprGS_splash_medium -- 48
sprGS_splash_large -- 55

grayman

grayman

22.07.2013 14:57

viewer   ~0005853

When the player falls into the water, the sound propagates. Makes sense.

When the player is swimming along the surface and dives under, we hear a splash sound. Currently, nothing is propagated to nearby AI.

When the player resurfaces (with or w/o the "deep breath" sound), we hear a splash sound. Currently, nothing is propagated to nearby AI.

Given the comment above that "swimming might make very little noise", please choose one of the following:

1 - propagate sprGS_splash_large because the splash we hear sure sounds like it's loud

2 - propagate sprGS_splash_medium (compromise)

3 - propagate sprGS_splash_small (compromise)

4 - continue to propagate nothing (but didn't we just hear a loud splash?)
Springheel

Springheel

22.07.2013 18:56

administrator   ~0005854

Does the resurface sound always happen? If the player can't avoid it then it should be a very minor sound, if it propogates at all.
grayman

grayman

22.07.2013 19:03

viewer   ~0005855

Yes, it happens all the time. I tried just letting the game lift me up slowly from the water by itself, and the splash plays even then.

I'll set it to the small splash sound.

I think it has to be something, because the splash you hear when you surface is reasonably loud, and if an AI standing nearby can't hear it, he's got to be awfully deaf.
grayman

grayman

22.07.2013 19:14

viewer   ~0005858

With the small propagated splash sound, I can surface a bit away from an AI and he won't hear me.

But if one is standing at the edge of the water and I surface behind him, he turns around in response to the noise.

If we want to retain the player's ability to surface close to AI w/o them hearing, then I'll need to adjust the volume of the audible splash sound to match the player's upward speed as he surfaces. Less speed, less volume. If the player simply rises to the surface w/o using the controls (the game lifts him up), then there should be no splash at all, and no propagated splash sound.

How's that 'sound'?
grayman

grayman

23.07.2013 02:13

viewer   ~0005868

Last edited: 23.07.2013 14:31

Fixed a problem where a weapon was lowered when you were swimming, but it was raised if you pushed yourself up at the water surface and the weapon raised again, just to lower when you dropped back down. The code thought you had left the water and were walking around in a puddle, so it was okay to raise the weapon again.

Fixed the problem of objects not propagating sounds when dropped in water. Springheel created 3 new propagated splash sounds (small, medium, and large) and the proper one is propagated based on the object's size or mass.

Fixed a problem where a propagated sound through a visportal sent an AI elsewhere to search, rather than to the visportal, where the sound was perceived to be coming from. A test was added so that if the real sound origin can be walked to, the AI will use that as the center of his search area. If he can’t walk to it, he’ll use the apparent sound origin (probably on a visportal plane) as the center of his search area.

Propagate a splash sound when resurfacing after swimming, and when submerging. Vary the audible sound so that if the vertical velocity is < 10, there’s no sound; if between 10 and 20, the sound is ramped, so that at 10 it’s -10dB and at 20 it’s 0; if greater than 20, there’s no volume adjustment. The same volume adjustment is applied to the propagated sound.

Rev. 5830:

AlertIdleState.cpp
IdleState.cpp
AI.cpp
Physics_Player.cpp
Liquid.cpp
Player.cpp
Player.h

Rev. 13562:

tdm_player_thief.def
tdm_propagated_sounds.def

Springheel

Springheel

23.07.2013 13:41

administrator   ~0005871

"If we want to retain the player's ability to surface close to AI w/o them hearing, then I'll need to adjust the volume of the audible splash sound to match the player's upward speed as he surfaces. Less speed, less volume. If the player simply rises to the surface w/o using the controls (the game lifts him up), then there should be no splash at all, and no propagated splash sound."

Yes, I like that a lot if you're up for it.
grayman

grayman

23.07.2013 14:28

viewer   ~0005872

Already included in last night's commit.
Springheel

Springheel

30.07.2013 01:02

administrator   ~0005911

I was playing in Solar Escape, and noticed that even when crouched, creeping off the edge as slowly as I could, I couldn't fall into the water trough beside the well without the thug inside the house making a comment about the noise. If he's outside the house he goes into agitated search.

I think this might be too harsh. What controls the propagated sound of the player falling into water?
grayman

grayman

30.07.2013 01:06

viewer   ~0005912

Last edited: 30.07.2013 01:07

Atm, nothing controls the propagated sound of falling into the water. The player's body will always do that, crouched or not. It's a large mass falling into water.

The sounds I put controls on are the ones played when the player is swimming and he rises above the surface, or drops below the surface. If you do those things slowly, there'll be little or no sound. If you do them quickly, you'll hear a splash, and so will nearby AI.

Springheel

Springheel

30.07.2013 01:37

administrator   ~0005916

"Atm, nothing controls the propagated sound of falling into the water. The player's body will always do that, crouched or not. It's a large mass falling into water."

Is the player currently set to propogate sprGS_splash_large?

If the player has no control over it, then we really should go with minimal sound propogation. Does the speed of impact have no bearing on how it is calculated?
grayman

grayman

30.07.2013 03:36

viewer   ~0005917

Any object hitting water with a velocity > 100 causes a splash, a wave, an audible splash sound, and a propagated sound. All but the audible sound are based on size or mass.

The audible sound is always snd_water.

The propagated sound is always sprGS_splash_large, based on the player's mass.

Issue History

Date Modified Username Field Change
14.05.2013 18:16 tels New Issue
14.05.2013 18:25 tels Note Added: 0005458
14.05.2013 18:26 tels Category Sound System => Sound
14.05.2013 18:26 tels Product Version => TDM 1.08
14.05.2013 18:27 tels Note Added: 0005459
17.05.2013 01:31 Springheel Assigned To => Springheel
17.05.2013 01:31 Springheel Status new => assigned
17.05.2013 21:25 Springheel Note Added: 0005480
02.06.2013 13:19 Springheel Note Edited: 0005480
06.07.2013 22:00 Springheel Assigned To Springheel =>
06.07.2013 22:01 Springheel Assigned To => Springheel
06.07.2013 22:01 Springheel Status assigned => new
07.07.2013 12:56 Springheel Assigned To Springheel =>
10.07.2013 20:35 Springheel Target Version => TDM 2.00
20.07.2013 23:49 grayman Note Added: 0005841
20.07.2013 23:51 grayman Note Edited: 0005841
21.07.2013 00:20 grayman Note Added: 0005842
21.07.2013 00:42 Springheel Note Added: 0005843
21.07.2013 00:49 Springheel Note Edited: 0005843
21.07.2013 00:50 Springheel Note Edited: 0005843
21.07.2013 00:59 grayman Note Added: 0005844
21.07.2013 01:05 Springheel Note Added: 0005845
21.07.2013 02:11 grayman Note Added: 0005847
21.07.2013 03:37 Springheel Assigned To => Springheel
21.07.2013 03:37 Springheel Status new => assigned
21.07.2013 14:39 Springheel Note Added: 0005849
21.07.2013 14:40 Springheel Note Edited: 0005849
21.07.2013 14:40 Springheel Status assigned => resolved
21.07.2013 14:40 Springheel Fixed in Version => TDM 2.00
21.07.2013 14:40 Springheel Resolution open => fixed
22.07.2013 14:57 grayman Note Added: 0005853
22.07.2013 18:56 Springheel Note Added: 0005854
22.07.2013 19:03 grayman Note Added: 0005855
22.07.2013 19:14 grayman Note Added: 0005858
23.07.2013 02:13 grayman Note Added: 0005868
23.07.2013 13:41 Springheel Note Added: 0005871
23.07.2013 14:28 grayman Note Added: 0005872
23.07.2013 14:29 grayman Note Edited: 0005868
23.07.2013 14:31 grayman Note Edited: 0005868
30.07.2013 01:02 Springheel Note Added: 0005911
30.07.2013 01:06 grayman Note Added: 0005912
30.07.2013 01:07 grayman Note Edited: 0005912
30.07.2013 01:37 Springheel Note Added: 0005916
30.07.2013 03:36 grayman Note Added: 0005917