Jump to content
  • Advertisement
Sign in to follow this  
kobe bryant

OpenGL Simulating rain droplets

This topic is 4807 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

Just to be clear I do understand particle effects, I just want to know what you use to simulate rain as a particle, I tried to use transparent quads but they just become too hard to see. I use OpenGL BTW. Thanx in advance for any help.

Share this post


Link to post
Share on other sites
Advertisement
Rain droplets dont warrant individual particles for each drop. That becomes too expensive on cpu imho.

If you use some mechanism of textures with multiple drops per texture, and translate the textures over some camera-centered geometry, you could get a convincing effect without the mass overhead.

Share this post


Link to post
Share on other sites
You can use a raindrop per particle (unless its very heavy rain - then put many raindrops on a single texture).
An easy way to implement without too much performacne loss is just to create a small volume of rain above the camera that follows the player around - no sense making the whole level rainy because the player won't be able to see firther than like 1 meter infront anyway.

I suggest you use blue/gray elongated quads that are more transparent at the top (darker in the direction they are falling) If you have a-lot of performance to waste you could light the drops with some specular lighting and create spashes on the floor - puddles.

Share this post


Link to post
Share on other sites
Quote:
Original post by mictian
Rain droplets dont warrant individual particles for each drop. That becomes too expensive on cpu imho.

If you use some mechanism of textures with multiple drops per texture, and translate the textures over some camera-centered geometry, you could get a convincing effect without the mass overhead.


If you attempt to have the rain fall over the entire 3D scene, then yes, this can become a drain on the system if your particle system is not highly tuned/efficient. The trick is to have the rain fall just around the camera with varying sizes of stretched particles, giving the effect of rain falling all over the scene. There are issues with this method, say when the camera gets close up to objects, but in general its a good and relatively cheap rain effect.

F451

Share this post


Link to post
Share on other sites
The new Game Programming Gems 5 book has some information on how to simulate rain/snow effects. You might want to give it a read through. It's only about 3 pages of information but it might give you some ideas.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!