Thunder and Rain
Post Reply
Quote
Re: Thunder and Rain
Posted by G4MER on Thu Jan 14th at 12:56am 2010


Is there a way to have points in a map that start or stop or trigger rain and thunder sounds?



Quote
Re: Thunder and Rain
Posted by Le Chief on Thu Jan 14th at 2:55am 2010


Assisted Answer
You should defiantly check out how to use soundscapes. I procrastinated learning how to use them at first but the truth is they're not hard to use, and make adding sounds to levels really easy and you have a lot more options.

Soundscapes - ideal for ambient/environment sounds such as rain and thunder. smiley
ambient generic - ideal for sounds that need to be triggered depending on events such as a beep sound when pressing a button or a sound effect to be played when the player walks passed a specific point.

Basically how soundscapes work is when the player collides with a soundscape volume (point based entity which you specify a radius for) and that soundscape is active until the player runs into another soundscape where the two soundscapes corssfade (the original fades out and the new one fades in).

For each soundscape you can specify what sounds play looping (ideal for rain) and you can also specify an array of sounds of which one of them can be chosen at random between every x and y seconds (say between every 20 and 40 seconds) and played (ideal for thunder). smiley

In fact here is a soundscape I made for Night Terror for the exact same effect (rain and random thunder).

"ForestOutdoor"
{
"dsp" "1"
"playlooping"
{
"volume" "0.5"
"pitch" "100"
"wave" "rain/heavy_outside.wav"
}

"playrandom"
{
"time" "20, 55"
"volume" "0.3, 0.6"
"pitch" "100"

"rndwave"
{
"wave" "ambient/thunder_1.wav"
"wave" "ambient/thunder_2.wav"
"wave" "ambient/thunder_3.wav"
"wave" "ambient/thunder_4.wav"
}
}
}






Quote
Re: Thunder and Rain
Posted by G4MER on Thu Jan 14th at 3:00am 2010


Is this a brush? or an entity?



Quote
Re: Thunder and Rain
Posted by Le Chief on Thu Jan 14th at 3:01am 2010


Quoting "Muhnay"
Is this a brush? or an entity?


It's a point based entity, not a brush based entity.






Quote
Re: Thunder and Rain
Posted by G4MER on Fri Jan 15th at 9:57pm 2010


Aaron how do I do this:

http://www.youtube.com/watch?v=lPmIM7Dm3xE&feature=related

But more with this sound level and sounds.. but with the FX of the lightening?

http://www.youtube.com/watch?v=e2LhfzbFo4g&NR=1




Quote
Re: Thunder and Rain
Posted by Riven on Sat Jan 16th at 3:53am 2010


The first vid is using the 2004/06 version of the Source engine and simply adding splash effects where the rain drops hit the ground or other surfaces. This must be a new piece of code added to the already implemented "func_precipitation" brush-entity. You can already implement rain in Source but they will not show such noticeable splash sprites where it hits.

The lighting effects can be calculated by a secondary light-source that would be triggered to turn on and off at the same time as the sound of the thunder. You could use a soundscape in the background to play a randomized sequence of generic rain, and wind sounds, but for your thunder/lightning scenario, you'd want to set them up to play everywhere using a couple of "ambient_generic" entities. And these "ambient_generic" entities would need to be tied to a "logic_relay" which should be tied to a "logic_timer" given a random time interval output so that it does not remain regular. So, only the thunder would be specific, not the rain and wind sounds.

The second video is the same "func_precipitation" brush entity, but showing off its updated look in the EP2/L4D2 engine. All that you see in that video is capable with the stock entities of Hammer for use in those games AFAIK.







Post Reply