Creating Rain using Particle System

Started by
1 comment, last by Narf the Mouse 11 years, 10 months ago
Okay, I have created a particle system and I can create fire, smoke, explosion, however I can't seem to get the rain work right.

What I am doing is that I am setting the particles position Y axis to a number to set the rain start position up and the gravity to a lower number to get the rain down from the start position towards the ground, then I move the rain OVER the camera, no matter where the camera move, the rain will move over it.

The rain works fine, however, when the player move, the particles take alittle time to go to the floor, so I see no rain! (sometimes I see alittle rain only) until I stop moving, the rain show up again.

In the particle system I set a variable for velocity (float), this variable represent how FAR the particles will be generated, so If I give a high number, the rain will not disappear when the player move, but I will get into another problem, the very close ground will not be having any rain, so it will look like its raining, but not on the close ground.
Advertisement
Given that rain falls pretty much vertically, you could keep track of which areas already have rain, and generate already fallen rain to seed the particle system when they turn. I think it would be close enough to seed rain at random heights (perhaps limited by when the particle generator was turned on/off and it's position, to account for rain starting or stopping).

Note that what you want is a little special purpose, e.g. would only apply to particles where their position can be efficiently calculated, which is pretty easy for rain if you assume it falls straight down (or at a slight angle according to constant wind) and that it accelerates according to gravity.
At this point, we'd pretty much need to see code.

This topic is closed to new replies.

Advertisement