Realistic Storm Effect

Tutorial collection, comprehensive listings on main site.

Realistic Storm Effect

Postby Tutorial on Wed Oct 03, 2007 7:14 pm

category
General Half-Life 2/Effects

description
Create realistic Lightning and Thunder effects

keywords
light, lightning, storm, thunder, flash, weather, rain.

Ever wanted to create a stormy atmosphere? But you were thwarted by the seeming in-ability of Hammer to create a real lightning?

Well, the time has come to take off those nasty glasses of ignorance (no offence), and unleash the power of trigger delays!

First, of course, you will need a map. Doesn’t matter what it is. As long as it has no leaks and is completely functional.

Second, you will need a number of entities:

- trigger_once / _multiple (depends on what you want)
- 2 × ambient_generic (one for thunder, and the other for rain sound)
- func_precipitation
- light

For this tutorial I used a simple box map with a lamp post casting a spot light.(I did not want to have a blunt box.)

Image

Now in that box, create a “light” entity. I recommend placing it somewhere in the middle of an open area. Go to the properties, and edit the “Brightness” parameter.

Image

You can choose any colour you like, but the brightness itself, which is the 4th value, must be set to something high (I have 100000000).

Image

Then go to the “Flags” tab, and tick “Initially dark”

Image

Name the light any name you want, something like “light1”

Create the sound entities. I never really understood env_soundscapes (which is a bad thing I guess:p), so I recommend creating a simple ambient_generic entity. Create two of them, one for the thunder, and one for the rain. Name them both accordingly, so you do not get confused later. You can choose any sound you like from the vast VALVe database.

Image

Go to the ambient_generic entity responsible for the rain sound, go to the “Flags” tab, and uncheck “Start silent” box, as well as “Is NOT looped”. Check “Play everywhere” box, however.

Image

Conversely, in the thunder sound, check all boxes, since you want the thunder sound to be triggered, not played from the beginning.

Image

What you then create is a trigger. Create a brush of any size, and tie (Ctrl + T) it to either trigger_multiple or trigger_once. This depends on whether you want the lightning to be triggered once (in SP games for ex.) or multiple times (for MP games for ex.). My trigger is trigger_once. Texture it by “tools/toolstrigger”.

Image

This is the somewhat hard bit. Go to the “Output” tab, and click “Add”. Select the way you want it to be triggered. I have mine set to “OnTrigger”. Your target entity is your light entity, however you named it. Mine is named “light1”. Now in the “Via this input” parameter, choose “TurnOn” from the list. Basically what you’ve done now is created a trigger by which the light will turn on.
In the “After a delay in seconds of” parameter, leave it to be 0.00.

Now press “Add” again. Choose the way you want it to be triggered. I recommend using the same way as in the first output. Select your light entity again. Now in the “Via this input” parameter, put “TurnOff”. Go to the delay parameter, and insert any number within reason. You do not want to have your flash to be active for a second, nor do you want it to be so fast you can’t even see it. I have my delay set to 0.03. What you have done just now is created a trigger, which when one activates, turns on the light, and in 0.03 seconds turns off. Simple isn’t it.

Of course we should not forget that there is a thunder sound to be played at triggering. Click “Add” again, and now select your ambient_generic entity responsible for thunder. Instead of “TurnOn” or “TurnOff” select “PlaySound”.

As you have probably learned from your physics course (hopefully), light travels faster than sound. Therefore, we set a delay for the thunder sound. Just like with the lightning, input values within reason. I have my delay set to 0.09 seconds, which in my opinion is just enough to create a realistic flash-thunder event.

In the end, your “Output” tab of the trigger should look something like this:

Image

Last, but not least, you should add rain into the map. Create a brush covering the area where you want rain to appear, and tie it to func_precipitation. Edit the settings to your preferences, and that is it.

You are done

Now all we need is for some experienced mapper to create an awesome abandoned city (i.e London after WW III), where you walk out of a building, there is a flash, a thunder, awesome rain on Episode 2 Source version, moaning of the wind, metal sounds, etc.

vcool
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby Meotwister on Wed Oct 03, 2007 8:58 pm

you should build a test map and post a screen of how it looks all together.
Check out my continually progressing portfolio!
http://meotwister.com - Finally up! I also blog there, too!

Image

www.NoMoreRoomInHell.com
User avatar
Meotwister
Resolute Games
 
Joined: Wed Jun 01, 2005 3:53 am
Location: Cordova TN YO!

Postby MrTwoVideoCards on Wed Oct 03, 2007 9:00 pm

Yeah that would be very nice.
User avatar
MrTwoVideoCards
Monothetic
 
Joined: Thu Aug 02, 2007 11:18 am
Location: IN YOUR SOUL

Postby Mess on Wed Oct 03, 2007 11:50 pm

you can use point_tesla to create an actual lightning effect, either in the map or your 3D skybox.
Image
User avatar
Mess
Interlopers Staff
Interlopers Staff
 
Joined: Tue Apr 26, 2005 11:53 am

Postby singe on Tue Oct 30, 2007 10:22 am

Also useful for convincing lightning is an env_fade set to blank the player's screen entirely white for 0.1 seconds.
singe
Regular
Regular
 
Joined: Sat Jan 29, 2005 11:20 am

Postby JLea on Fri Nov 16, 2007 4:40 pm

Wouldn't this lag the shit out of your PC? Or cause VRAD to die while compiling a 100000 brightness light over the entire map?
User avatar
JLea
May Contain Skills
May Contain Skills
 
Joined: Mon Jan 02, 2006 1:19 pm
Location: Melbourne, Australia

Postby visselke on Fri Nov 30, 2007 5:38 pm

You have to experiment with the brightness to get the right setting for your map.
When your brightness is set to high it may result in everything being overlit and that could turn out ugly when lightning strikes.
Had this with a map I'm working on, certain textures where rather white and it looked like the light came from them when the flashes where triggered.
visselke
Been Here A While
Been Here A While
 
Joined: Mon Nov 22, 2004 7:51 pm
Location: Belgium

Postby vcool on Fri Nov 30, 2007 6:47 pm

Wow, I just noticed it gost posted...

I expected it to come under Lighting section so I checked there...

Singe - I think that will happen if you have lots of env_masks...

Mess - That or you could use the env_beams and create branches and make it look like a lightning. (this was suggested by Aus_Karlos)

Meotwister, MrTwoVideoCards - yeah, I should. I'll make one as soon as the school pressure is off.
Image

Neighborhood Forum Elitist
User avatar
vcool
Veteran
Veteran
 
Joined: Fri Jun 23, 2006 1:03 am
Location: USSR

Postby dissonance on Fri Nov 30, 2007 8:28 pm

Can you make animated normalmaps?
i had fun once, and it was awful.
User avatar
dissonance
Veteran
Veteran
 
Joined: Wed Oct 10, 2007 12:35 am
Location: usa

Postby ferret on Fri Nov 30, 2007 10:02 pm

this is just not a good way to do this. We're talking chance of major lag here.

A tutorial needs to be done on how to do this with color correction.
*** May the Source Be With You ***
User avatar
ferret
Senior Member
Senior Member
 
Joined: Fri Jun 10, 2005 10:03 pm
Location: oHIo

Postby vcool on Fri Nov 30, 2007 10:45 pm

Shouldn't be hard...
Image

Neighborhood Forum Elitist
User avatar
vcool
Veteran
Veteran
 
Joined: Fri Jun 23, 2006 1:03 am
Location: USSR

Postby snotball on Thu Dec 13, 2007 6:45 am

Yeah I think colour correction is the right way to go here as well. Strictly client side and a post effect only. Just up the contrast really much for a split second.
Hm but to look good shadowy areas would probably have to be lit more anyway...
Image
User avatar
snotball
Pheropod
Pheropod
 
Joined: Tue Sep 12, 2006 9:55 am
Location: Denmark

Re: Realistic Storm Effect

Postby butter_biscut on Sat Aug 30, 2008 7:48 pm

is there a way to make this flash automatically?
butter_biscut
Member
Member
 
Joined: Mon Aug 11, 2008 7:10 am
Location: Nevada, area51

Re: Realistic Storm Effect

Postby joe_dirt976 on Sat Aug 30, 2008 10:18 pm

ya i use a logic_timer and set it to fire at random. i also tie it to an ambient_generic with a slight delay for a thunder effect. <posting from a phone>
User avatar
joe_dirt976
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Sun Nov 18, 2007 10:47 pm
Location: USA

Re: Realistic Storm Effect

Postby JakeB on Sun Aug 31, 2008 12:58 am

I did a tutorial similar to this..ripped it right from Vampires - The Masquerade: Bloodlines too!
It uses sprites instead of lights.

But this tutorial is nice,
User avatar
JakeB
Regular
Regular
 
Joined: Sun Sep 02, 2007 4:59 am
Location: Canada

Return to Tutorials

Who is online

Users browsing this forum: No registered users