Archived

This topic is now archived and is closed to further replies.

Ilici

Good Looking Rain

Recommended Posts

Ilici    862
I''m working on atmospheric effects and i''me currently implementing rain. After searching the forums i found that a good way to render rain is using particles. However as i''ve seen in many games animated textures with rain droplets are used. Using particles is slow - for > 1000 rain drops using sprites the FPS begins to drop. In Morrowind the rain simulation is quite good - you can see the rain drops correctly in all directions. Using simple textures creating a cylinder around the player does not produce this effect. Any ideeas how to do it? [ My Site ] ''I wish life was not so short,'' he thought. ''Languages take such a time, and so do all the things one wants to know about.'' - J.R.R Tolkien /*ilici*/

Share this post


Link to post
Share on other sites
gumby    122
You need to optimize your particle physics and/or rendering if a system of 1000 particles causes a noticable hit.

Particle-based rain can look decent, keep trying.

Share this post


Link to post
Share on other sites
Ilici    862
I know i have to omptimize it, but i was wondering about other ways to make rain.



[ My Site ]
''I wish life was not so short,'' he thought. ''Languages take such a time, and so do all the things one wants to know about.'' - J.R.R Tolkien
/*ilici*/

Share this post


Link to post
Share on other sites
Sneftel    1788
One common technique is to render a rain texture over the screen, after the scene is rendered. If you use multiple rain textures scrolling down at different speeds, this can look pretty good. It has problems when you don't just look forwards, tho.


How appropriate. You fight like a cow.

[edited by - sneftel on October 11, 2003 3:11:50 PM]

Share this post


Link to post
Share on other sites
Karl G    170
The way that I made rain at first was using a linelist with a blue material. It worked pretty well but it was slow at >10,000 particles, and you could notice some strange anomolies with it...namely being that as you got closer, the particles got smaller and smaller and smaller....etc. This is because lines are only 1 pixel no matter how close or far away you get.

Share this post


Link to post
Share on other sites
_DarkWIng_    602
PS can work just nice. But instead of single particle representing one raindrop make it represend a bunch of them. Just make a nice texture and use for particle. (this is simmilar to what morrowind did)

You should never let your fears become the boundaries of your dreams.

Share this post


Link to post
Share on other sites
treething    122
If you just use a texture then the rain wont intersect properly with geometry (no depth information). If you use any screen-space method then it wont look correct as you rotate, and probably wont have the depth either.

Personally I just use a particle system. About 1000 particles is all you need to get a good downpour. Just make them fairly neutral coloured, quite elongated, and about 30% opaque.

Share this post


Link to post
Share on other sites
sBibi    241
mmh, just some suggestions
you really need detailed drops rendered with 1 particle per rain drop close around the camera, u could use a level of detail for your rain drops, and draw the ones that are not so close with multiple drops per particle. and render only the rain drops that are within something like a 10 meters radius area?
and use a very light fog to simulate the ones that are far away.
and use a scrolling blur texture that will simulate a nice property of rai I haven''t seen yet in any simulation: that is, rain doesn''t fall homogeneously. you have layers where there are more raindrops than other, especially if there is wind. (that''s only really noticeable in heavy rain, where rain drops are quite large...)

Share this post


Link to post
Share on other sites
James Trotter    432
Sorry if this is a little off-topic!

quote:
Original post by gumby
You need to optimize your particle physics and/or rendering if a system of 1000 particles causes a noticable hit.



Do you have any ideas, or suggestions of how to optimize a particle system?

Thank you.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Have x particles moving with the same speed in the same directions (updating the pos in hardware by a matrix). Now have y these kind of systems with different specifications and you got a nice looking rain .

x = 200
y = 8 (8 vertex buffers)

=> x*y = 1600 particles ... all the math is done in hw so it runs VERY fast.

Good Luck!

Share this post


Link to post
Share on other sites
Thr33d    382
Hmm, just thinking aloud:

Maybe you could load different Mip-Map levels with different densities of rain particles, making the further ones more 'opaque' or 'dense' than the close mipmap levels. This way you might be able to use less (larger) particles at further distances, still have the visual complexity, and maybe blur the further mipmap levels a little so you could just fog after about 20-50 ft.

If you try it, tell me how it works. (I'm thinking of using quad shaped particles, rather large ones, kinda similar to how some 1/2 complex hair models are (ya know, with the "patches" (not bezier) of hair - maybe you could make "patches" of rain) )

Up close you could scale the polygon and tex coords to lessen the appearent tiles/patches and prevent excessive overdraw. Or maybe just switch from patches to particles at a certian distance. The patch would be 2d, but each patch could represent a 3d cluster of particles... maybe associate a seed value for generating the 3d offsets from the patch's orgin or something (unless that's too much processing)

-Michael

[edited by - Thr33d on October 15, 2003 12:37:56 PM]

Share this post


Link to post
Share on other sites
griffenjam    193
quote:
Original post by Ilici
I know i have to omptimize it, but i was wondering about other ways to make rain.



Have you tried doing a dance?


I would stick with particles, or you can be totally lame and use and animated texture that you just put on a quad over the entire screen. It would probably be a little faster than particles, but would look like crap.

Share this post


Link to post
Share on other sites
Ilici    862
*dances around singing* - still no rain

Thanks for the replies guys!!

I guess i'll stick with a particle system and use some sprites, calculate the vertices for each sprite and store them in a vertex array and render that.




[ My Site ]
'I wish life was not so short,' he thought. 'Languages take such a time, and so do all the things one wants to know about.' - J.R.R Tolkien
/*ilici*/


[edited by - Ilici on October 16, 2003 12:23:46 PM]

Share this post


Link to post
Share on other sites