How to create the rain?

Hello everyone!
How to create the rain or snow in “Roaming Ralph” project.
Please show me some code… :blush:

That is a difficult one. Its not just ‘some code’. You will probably need to write an extended cg shader or so. It might be useful to read through documents on this page, to find a way first HOW to do rain/snow:

Oh thank you!
I will try. :astonished:

There are other ways to do it too if you would prefer not to use shaders. Rain could be done using particles, or you could have a mesh (or meshes) with an animated rain texture that follows the camera.

I have seen some codes about creating the rain using particles in DirectX.
I tried to read the Panda3D tutorials about particles programming.
But I has no idea how to create rain to my scene.

Any idea? Thank you. :smiley:

like trex already said ->easiest way to fake rain:
create a few cylinders around the camera’s position, texture them with a rain texture (mostly transparent with some vertical raindrops), move the textures along the cylinder axis with textureSetPos.
3 to 5 cylinders with maybe 6 or 8 sides should do.
note: make the cylinders long enough, best is to add fog and make the cylinders 2 times as long as your far-fog-distance.
works great with snow ,too. if you are inside a building and looking outside then you can add a few planes behind the window.

Oh that a very good idea! ThomasEgi.
I will try!
thank you very much.

ThomasEgi, problem. You won’t see the rain falling on the water then… You will have to write a shader for that.