rain/snow

Started by
1 comment, last by vaneger 20 years, 4 months ago
what do most people do for this in games? i was thinking of using a particle system that follows a fractal pattern for disperson but im not sure what to do for accurate accumaltion.never mind the whole idea of how slow it might be to do i can modify that part later how can i get realistic rain and snow accumaltion patterns?
Advertisement
A particle system will work well for the falling part. Continuing to maintain the particles after they hit the ground and start to accumalate would be far too processor intensive. I recommend separting your ground into sections and give each a number that records the number of particles that have fallen on it. Then, update the texture to look wetter or snowier every time that number reaches certain levels.
7|-|3 p057 @b0v3 i5 c3/^7i|=i3|) 1337!100|< |=0/^ j||3|/|7
What JNewt suggested would work, but collision detection on the particles to determine what section of ground they hit would be too much processor work.

Instead, divide your ground as he suggested, and then before creating your particles, select which section they should fall towards. Set the vectors of the particle correctly, and let them fall.

After the correct amount of time has passed (when the particle has had plenty of time to fall,) remove the particle and update the particle hit number of the surface you selected it to fall upon.

This remove collision detection of the particle to the ground, and creates the same effect. The small amount of processing time overhead to create a particle is insignificant compared to the time collision detection would take every frame.

daveandrews.org - a Christian Programmer's Weblog | Dusty Engine - a task engine using Irrlicht | Computer Guys Run the World

[edited by - Ronin Magus on November 29, 2003 4:21:15 PM]

This topic is closed to new replies.

Advertisement