Rain effects

Started by
5 comments, last by CrazyCdn 18 years, 6 months ago
Hey, Im currently working on implementing a particle system in DirectX with the hope of simulating rain effects. In the past I have always rendered particles using points, am I right in thinking that to simulate rain I should render lines? If so how would I decide what length the lines should be? (if line.start = particle.pos, line.end = ???) Finally how could I set the line to interpolate from one colour to another to make it look like a droplet at the bottom and trail behind it? Thanks for any help
Advertisement
Short lines would look best, make the lines fatter to simulate heavy rain. The length of the lines all depends on the amount of rain fall you want to simulate. For color I would think it would be best to make the droplet a light color, white/gray, then make the tail a dimmer color.
Quote:Original post by hoogie
(if line.start = particle.pos, line.end = ???)


why not make the following?

line.end = line.start + particle.dir.normalize() * line.length


“Always programm as if the person who will be maintaining your program is a violent psychopath that knows where you live”
You can use point sprites with a texture and an alpha mask. The alpha mask is used to get the line shape so it is not square.
-----Quat
You could always just render quads, with textures of lines with alphablending and alphatesting. This would be simplest, and would definatly look excellent (depends on how good your textures are).

With alphatesting, this shouldn't be too slow, either.
Sirob Yes.» - status: Work-O-Rama.
I've seen rain done with a number of billboarded particles; this works great for heavy rain droplets, and works OK even for medium rain. Only the vague drizzle can't really be done that way, but that's because you don't have pixels small enough on the screen -- at that point, you can simulate it with fog.

Remember to actually do something where the rain hits the ground. Make the ground darker (to simulate wetness) and more specular (to simulate reflection from wetness). Make water surfaces get a detail-normal map that simulates excitation from water drops. Etc.
enum Bool { True, False, FileNotFound };
Make the rain dark, more realistic. Make the lines longer if it's coming down faster/harder (also thicken them just slightly, rain is not wide). If it's a light rain you could have the lines so short it's nearly a point. Just experiment.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

This topic is closed to new replies.

Advertisement