Thunder and Rain

Thunder and Rain

Re: Thunder and Rain Posted by G4MER on Thu Jan 14th 2010 at 12:56am
G4MER
2460 posts
Posted 2010-01-14 12:56am
G4MER
floaty snark rage
member
2460 posts 360 snarkmarks Registered: Sep 6th 2003 Location: USA
Is there a way to have points in a map that start or stop or trigger rain and thunder sounds?
Re: Thunder and Rain Posted by Le Chief on Thu Jan 14th 2010 at 2:55am
Le Chief
2605 posts
Posted 2010-01-14 2:55am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
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. ;)
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). :)

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"
}
}
}
Aaron's Stuff
Re: Thunder and Rain Posted by G4MER on Thu Jan 14th 2010 at 3:00am
G4MER
2460 posts
Posted 2010-01-14 3:00am
G4MER
floaty snark rage
member
2460 posts 360 snarkmarks Registered: Sep 6th 2003 Location: USA
Is this a brush? or an entity?
Re: Thunder and Rain Posted by Le Chief on Thu Jan 14th 2010 at 3:01am
Le Chief
2605 posts
Posted 2010-01-14 3:01am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
"Muhnay" said:
Is this a brush? or an entity?
It's a point based entity, not a brush based entity.
Aaron's Stuff
Re: Thunder and Rain Posted by G4MER on Fri Jan 15th 2010 at 9:57pm
G4MER
2460 posts
Posted 2010-01-15 9:57pm
G4MER
floaty snark rage
member
2460 posts 360 snarkmarks Registered: Sep 6th 2003 Location: USA
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
Re: Thunder and Rain Posted by Riven on Sat Jan 16th 2010 at 3:53am
Riven
1640 posts
Posted 2010-01-16 3:53am
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
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.
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202