Making Rain

From Serious Sam Wiki
Jump to: navigation, search

by Mischievous - Training future gods :)

Making Rain and other environment effects

Note: Just because it's called "Rain Effect" Doesn't mean that it can't be used for just about anything you want to fall from the sky.

Now on with the tutorial...

Step1 - Make a simple world

Make a simple world (I'll assume you already know how to do that.), add a a terrain primitive - 100 on 100 in size , and give it some ground material . Also add some boxes to use as a roof, when test your final rain effect.

If you like, you can just download this template world I made

Your first rain shelter.

,just for this tut.. It has everything set, except for the rain, witch is all up to you.

Note: A .gro is just like any .rar or .zip file, so you can easily open it with WinRar. Extract the .gro's contents to your Serious Sam HD folder, witch should look like this "...~Steam\steamapps\common\serious sam hd the second encounter"

step 2 - Making the Rain Effect

Add a particle effect and place it in the center of your world, then go to the Entity window . See the property named "Effect" at the top of the list ? Simply click on the field next to it , then New->CEffect .

The property named "Effect" should now have a small + in-front of it's name, expand it by clicking on it.


Before we can start making the actual rain, we must set the "Initial Bounding Box" of the particle effect. The "Initial Bounding Box" simply sets the box , within witch, it will rain. Usually if your particles won't show, you forgot to adjust that :) Expand the property. By default x0,y0,z0 are set to -0.25 and the rest to +0.25. Set them to x0,y0,z0 = -100 and x1,y1,z1 = 100 or bigger for bigger maps.Just remember this one thing , x0,y0,z0 should always, Always , have negative values, and x1,y1,z1 - positive.

Note, and this one is important: -100 and 100 is the smallest "Initial Bounding Box" allowed! For some reason, you just can't have a smaller one.


OK, now let's start making the rain , I think Sam's enjoying his sunny vacation a but too much . Head down to the "Particle Effects" , and click on the yellow + next to it's name. This will promote you to chose what type of effect to add. There are all sorts of effect types,for now we only care for the "Rain particle effect" one.


Right now, you should be looking at a lot of new options, that have just surfaced from the depths of Serious Engine 3, but don't worry, most of them are easy to understand.

You set the shape of your particles from "Rain Drop Size",rain is more line shaped, so values like x0.01 and y0.1 are ok , may be x0.01 and y0.2 /0.4 , it depends , but if you want to make snow you'll want to set them to something like x0.2 and y0.2 .

"Range of visible area" determines how far away you can see the particles,anything beyond this distance won't show. The option below it.

"Count of drops per length of visible area", determines the density , low values will result in light rain, higher will be more like a thunder storm, or a white out, if you are making a winter map :D . For now set it to 50.

Note: When increasing your visible area, remember to up your particle density as well.

From the "Material" property you get to add a material to your particles. Let's add one! Just like you added the effect earlier , click on the field next to it .


Some white likes should appear all about. Don't look much like rain ,though,looks more like a giant cube exploded in the sky, and those are it's debris raining down , bot don't worry. Click on the yellow + next to "Configurations" ,this will let you add any shader you want.


Click on browse. For now use the "Particle" shader. Usually that's the shader you'll use most often when making particles.

Set a texture and use 'Texture' as uvmap,and set "Blend Type" to Translucent .


Note: Particles in SE3 now can have any shader , or shaders , you want, how awesome is that ?

Note: SS HD's rain texture can be found in "~Content\SeriousSamHD\Textures\Effects\Particles\" and it's name is "RaindropAnimation.tex" ,also remember to set the "Texture Frames"

How the texture frames options should look ,when using Cro-Team's rain texture.

property when using that texture. It should be "X Frames" = 21 and "Y Frames = 1 and with "Start Random Frame" set to off

Your particles have probably dissipated,after doing that , but don't be sad,they were hideous anyway. You see that "illumination" property? Click on the right most rectangle, a window should pop-up , allowing you to adjust the color.It's wise to use only shades of gray for the Imagination color. So I suggest that you use something like R - 26 G - 26 B - 26. You can input those in the RGB value properties on the right bottom side of the color picker window. you should how see your particles, in color, and texture.

Note: You can also adjust color by clicking and holding on the rectangles. Each represents a color value. Like color , saturation (colorful-nes),and brightens.

Note: For performance, you can set "no dynamic lightning", other wise it may lag if you have a lot of particles, because the game will calculate lighting and shading for each one

caption This is how your material setting should look, as you see there are some rain drops in the editing view.

Ah, now that wasn't too hard , was it ? Don't worry, it's supposed to look like that at this stage :D ... an accurate definition would be "A pretty reasonable extremely light rain" , Hmm, you'll never make it on Sam's black list, with that punny thing,would you? Come on, let's make a thunderstorm!

step 3 - Making it on Sam's black list

Now that you have a base to work with, let's start to tweak it.

Using more than one rain effect can add depth and volume. Right - 2 rain effects. Left - Just one.

There are zounds of things you can do,you could even add more than just one rain particle effect,to simulate distant rain.

For now let's just stick with one particle effect. After finishing this tutorial , you'll be able to make the second one on your own. Don't worry I'll give you some hints.

Back to our rain, Let's first modify it's shape.

Go to "Rain Drop Size" and expand it. I suggest that for now , just set it to like X=0.02 and Y=0.6, this will give us a nice start. Notice that the rain impact particles also increased in unreasonable size ? CT made a nifty multiplier option for their size, entitled "Size Multiplier During Impact Animation" , set it to O.4.

Note: Notice that it could be affected by a graph.


Starting to take shape...

Let's leave the rain shape for now, though we might come back to it later on.

Going over to the "Count of drops per length of visible area" or in lamers's terms "How many particles are there /relevant to the rain view distance"...uhh... That probably confused you more, so just set it to 40 and see the results. Simply the larger the "Range of Visible Raining Area" the more particles you'll need. For now it's fine, though it became obvious that we'll have to reshape the rain. Usually when I make rain , I run back and forth through the options, until I'm happy. I never made a good "Rain Making Work Flow" ...

Let's recolor. We'll play with the shape more in the end. Up until now you , your particles had the default color. Open up the color picker window, by pressing the right most square on the "Rain Drop Color" and set it to RGB=148 and Alpha= 90 caption

At this point I'm thinking that the shape's ok, but the splash needs to be smaller....

Step 4 - Fine Tuning

Running back and forth, like some deranged squirrel, I finally stumbled upon the right combination, that fit this level. That's the problem with rain, It could look perfectly good on one level, but look really out of place on some other. There really isn't a "Global Rain Setting".

So here's what I did for this level.


I modified the color a bit more, and most importantly, tinkered with the "Drop Impact Anim speed min/max" those set the frame rate of the drop animation.

So there you go, this now looks good, almost like CT's rain. And look, the beaches are clearing out...

step 5 - Baking Height Map

Well actually just select the particle effect, and press "Shift+B" And that's mostly it. Just one thing to note, That if you have larger maps,and larger bounding boxes for the rain, like 200 + You can adjust the detail of the rain height map, from the "Height Map Size Per Pixel [m]" You can also adjust this if you have a very dense rain. Another cool note is that you can display the height map from the "Display Height Map Points" option. A word of advice though, if you have a very detailed map, this may crash SE3.