• Advertisement
Sign in to follow this  

Rain effects

This topic is 4500 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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


Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement