Rain and Snow

I’d like to add falling rain and snow to my project, but I’d like it to look good.

The goals are:
1.Same setup for snow and rain and other things falling from the sky (eg. meatballs, cats and dogs, hail).
2. Snow/rain not glued to the camera
3. TPP camera (rotates around a point in front of the camera)
4. Camera can look up and down (at worst limited to +/-80 deg.)
5. Camera can move fast

Things that I think won’t work.

  1. Texture scrolling on the camera.
    -when looking up the rain will fall sideways
    -when moving the rain moves as well
  2. Cone or cylinder around the camera
    -would need to have a radius as big as the distance between the camera and the point aroud the camera rotates (the rain is too far if on the inside of the cylinder)
    -moves with the camera
  3. Particles
    -camera can ‘outrun’ slow falling snow
    -cpu intensive or needs geometry and/or compute shaders
    -I don’t like the panda particles much, they always run slow on my pc

Before I start tinkering on offscreen, clip mapped, hardware instanced rain geometry with linear depth buffer composition (don’t arsk…) I’d like to know if anyone here had some successes with rendering rain and snow, or has any usefull links?

I know of a article in ShaderX5 about layerd rain rendering, but it looks like it’s about the ATI ‘Toy Shop’ demo, and that demo uses just a texture scrolling over the camera.

There’s also a paper on rain in MotoGP but it’s about not showing rain falling from the sky and still getting a wet look.

I was also told there was a article on snow in Game Programming Gems 5, but I don’t want to buy the book just to see if it’s any good.

I had some luck in the past with various planes being positioned in the scene, with a scrolling rain texture applied to them. You can fade the texture out at the bottom (a la soft particles) so that you don’t see where the planes enter the ground, and you can fade them out as you approach them or look at them from a grazing angle so that you don’t ever get too close to one of them.

That would work for rain; I don’t think it would be a good option for cats and dogs.

Then you could consider a postprocessing shader - I haven’t actually tried this, but in theory it should be possible to do this in post since the depth buffer alone should give most of the information you need. You would also need some sort of occlusion map or shadow map or other way to determine where the rain falls and doesn’t fall, though.