SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 07-06-12, 03:32 PM   #1
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default [TEC] AmbientVolume controller

Hi there,

I am currently working on importing a SHIII unit in SH5. Among other things, I am trying to set the volume of its sounds. For doing it I am using the AmbientVolume controller, that allows us to change sound volumes depending on both camera and parent object's location.

Its main parameters are sorted in arrays. Each array is composed by an identifier (making reference to SounSource identifiers in the same dsd file) and by a group of volume modifiers for different camera and object position:

Code:
ObjectAboveWater
ObjectBelowWater
CameraAboveWater
CameraBelowWater
CameraInterior
CameraSonar
So far so good. I'm experiencing a couple of shortcoming though:

- whenever I set two or more sounds to share the same identifier, trying to set their volume as a group, SounSource stops working and they can be heard "normally" in game as if the controller wasn't there.

- If I am not mistaken, sound modifier parameters seem to be expressed as percentages of the original volume (0=silent, 1=100%); nonetheless, everytime I try to set a value <1, instead of being reduced sounds are zeroed. In other words, the controller behaves like an on/off trigger.

Did anyone else experiment with it? I wonder whether I am missing something, or peraphs AmbientVolume is no longer fully supported by SH5?
gap is offline   Reply With Quote
Old 07-06-12, 03:40 PM   #2
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

AmbientVolume controller works fine in SH5. Take a look at FX update, it uses it for the flares, debris, torp explosion, etc.. Sounds more like you're using an illegal identifier. What identifiers are you using? You did add your sounds to the Sh.sdl file correct?
TheDarkWraith is offline   Reply With Quote
Old 07-06-12, 03:45 PM   #3
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default Triggering sounds

Another quick question on sounds:

I wish some sounds to be triggered by particle generators (splashes, wakes, etc), i.e. being played during the lifespam of particles, and stopping particles desappear.

I am sure something like this is feasible, but I have no clue on how to do it. Until now simply giving these sound the same parent IDs as the particle generator tha should trigger them, didn't give the expected results.

Probably I could get inspired by some existing unit, but if in the meanwhile some good-hearted oldtimer will read this thread, his help will be much appreciated!
gap is offline   Reply With Quote
Old 07-06-12, 03:51 PM   #4
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Another quick question on sounds:

I wish some sounds to be triggered by particle generators (splashes, wakes, etc), i.e. being played during the lifespam of particles, and stopping particles desappear.

I am sure something like this is feasible, but I have no clue on how to do it. Until now simply giving these sound the same parent IDs as the particle generator tha should trigger them, didn't give the expected results.

Probably I could get inspired by some existing unit, but if in the meanwhile some good-hearted oldtimer will read this thread, his help will be much appreciated!
The sound has to be attached (it's parent node) to the type 4/100 node of the particle (if you want the sound to be associated with just the particle) or of the particle generator (thus sound is played where the type 4/100 node's location is)
TheDarkWraith is offline   Reply With Quote
Old 07-06-12, 03:55 PM   #5
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
AmbientVolume controller works fine in SH5. Take a look at FX update, it uses it for the flares, debris, torp explosion, etc.. Sounds more like you're using an illegal identifier. What identifiers are you using? You did add your sounds to the Sh.sdl file correct?
Yes I did, and for any other purpose they play correctly in game.

As for identifiers, I am using custom ones. Suspecting that this could have been the reason, I tried to change them with standard ids (iirc Propeller, or Engine), and it didn't make any difference.

I'll try again anyway. Thanks!
gap is offline   Reply With Quote
Old 07-06-12, 03:59 PM   #6
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Yes I did, and for any other purpose they play correctly in game.

As for identifiers, I am using custom ones. Suspecting that this could have been the reason, I tried to change them with standard ids (iirc Propeller, or Engine), and it didn't make any difference.

I'll try again anyway. Thanks!
For 'normal' sounds Effect is the correct identifier. For underwater sounds hy2 is the correct identifier.
TheDarkWraith is offline   Reply With Quote
Old 07-06-12, 04:00 PM   #7
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
The sound has to be attached (it's parent node) to the type 4/100 node of the particle (if you want the sound to be associated with just the particle) or of the particle generator (thus sound is played where the type 4/100 node's location is)
Is this enough? Are there no special names/settings to be given in .sdl file? No special identifier to be set in SoundSource controller? No other controller in .dsd file to be associated with generator's ID?
gap is offline   Reply With Quote
Old 07-06-12, 04:01 PM   #8
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
For 'normal' sounds Effect is the correct identifier. For underwater sounds hy2 is the correct identifier.
Ah okay, I'll try it and report back in a few... thank you very much!

EDIT:

WHY hy2? Isn't it hyd? On the unit I am workin on the Identifier hyd seems to work correctly....
gap is offline   Reply With Quote
Old 07-06-12, 04:05 PM   #9
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Is this enough? Are there no special names/settings to be given in .sdl file? No special identifier to be set in SoundSource controller? No other controller in .dsd file to be associated with generator's ID?
That is all. It's really that simple to add new sounds (besides needed entries in DSD file and Sh.sdl also)

Your SoundSource, AmbientVolume, and SonarTarget entries parent ID will be what I spoke about above.
TheDarkWraith is offline   Reply With Quote
Old 07-06-12, 04:17 PM   #10
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Sorry, one more question:

according to your experience, is sounds volume, especially on hydrophone, somehow related to ship's current speed? Perhaphs through the ShipSound controller (StdByMaxRpm parameter)? If so, is there any way to set sounds free from this constrain?
gap is offline   Reply With Quote
Old 07-06-12, 04:26 PM   #11
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
WHY hy2? Isn't it hyd? On the unit I am workin on the Identifier hyd seems to work correctly....
hy2 is what all the stock DSD files in SH5 are using for underwater (hydrophone) sounds. It appears they made a change to the game engine and hy2 is the new underwater identifier. No idea what happens if you use hyd.

Quote:
Originally Posted by gap View Post
Sorry, one more question:

according to your experience, is sounds volume, especially on hydrophone, somehow related to ship's current speed? Perhaphs through the ShipSound controller (StdByMaxRpm parameter)? If so, is there any way to set sounds free from this constrain?
If the sound's SoundSource identifier is Effect or hy2 it's free of this constraint. I've found that only sounds made through a controller (i.e. ShipSound) have this constraint.
TheDarkWraith is offline   Reply With Quote
Old 07-06-12, 04:53 PM   #12
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
hy2 is what all the stock DSD files in SH5 are using for underwater (hydrophone) sounds. It appears they made a change to the game engine and hy2 is the new underwater identifier. No idea what happens if you use hyd.
It works too. Tested several times during these days. Also imported units contained in OHII do use this identifier and by the way with no exception they miss the SonarTarget controller, with no apparent problem.

Quote:
Originally Posted by TheDarkWraith View Post
If the sound's SoundSource identifier is Effect or hy2 it's free of this constraint. I've found that only sounds made through a controller (i.e. ShipSound) have this constraint.
So maybe I know what is happening: probably sh5 sound's volume can be modified only once. In other words, you can't apply a sound modifier on top of another one.
My sounds, not having the hy2/Effect identifier, are subject to the ShipSound controller. That's why SoundVolume behaves like a switch: everytime it tries to change the volume for the second time, sound aren't played at all. This is the theory. Now it has to be proved or controverted in practice.

Here comes my next question: what if I want to set two or more groups of sounds having different SoundVolume settings, since we have only the "Effect" option for non hydrophone identifiers? Is it possible that devs din't think about it?
gap is offline   Reply With Quote
Old 07-06-12, 04:58 PM   #13
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Here comes my next question: what if I want to set two or more groups of sounds having different SoundVolume settings, since we have only the "Effect" option for non hydrophone identifiers? Is it possible that devs din't think about it?
You create another type 4/100 node that has the parent of the original type 4/100 with 0 for position and rotation data. Now you set your next sound to this (it's ID). You keep adding type 4/100 nodes to the main 4/100 node for each sound you need a SoundVolume controller to work on

structure would look like this:

main 4/100 node - SoundSource, AmbientVolume, SonarTarget
|
- child 4/100 node - SoundSource, AmbientVolume, SonarTarget
|
- child 4/100 node - SoundSource, AmbientVolume, SonarTarget
|
etc.
TheDarkWraith is offline   Reply With Quote
Old 07-06-12, 05:37 PM   #14
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
You create another type 4/100 node that has the parent of the original type 4/100 with 0 for position and rotation data. Now you set your next sound to this (it's ID). You keep adding type 4/100 nodes to the main 4/100 node for each sound you need a SoundVolume controller to work on

structure would look like this:

main 4/100 node - SoundSource, AmbientVolume, SonarTarget
|
- child 4/100 node - SoundSource, AmbientVolume, SonarTarget
|
- child 4/100 node - SoundSource, AmbientVolume, SonarTarget
|
etc.
Yep, I thought of this easy method just after pushing the "Submit Reply" button

As for hydrophone sounds, it seems we don't need to resort to the node structure you have depicted. I got several hydro-sounds linked to the very same parent node playing at once, by simply putting a SonarTarget controller after each SoundSource entry in DSD file. But, since they had different min and max radius set in sdl file, I had to sort them from the lowest (on top) to the loudest, otherwise only the loudest, the one having the highest maximum range set in sdl, was played.

P.S. as suggested by you, I've tried to switch to "Effect" the identifier of sounds whose volume I wanted to change. But something was wrong:

they started to be played in sonar room (where their volume was set to 0) while on external camera their audible range was greatly shortened (ignoring sdl ranges). On the other hand, external cam above water volume was set to .5, and this time the sound was audible, but I couldn't hear any differece with the underwater volume that was set to full (1). I am missing something, or for what I am trying to do the Effect identifier doesn't work either...
gap is offline   Reply With Quote
Old 07-06-12, 05:48 PM   #15
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

what exactly are you trying to do
TheDarkWraith is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:10 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.