Rain Effect theories
Rain Effect theories
Well, i have been looking into rain effects, and im wondering , how would you do yours? Personally i tried using a structure with x.l and y.l in it and having it draw everything in it at the right values, but it doesnt seem to work, so in theory, how would you do it?
- Joakim Christiansen
- Addict

- Posts: 2452
- Joined: Wed Dec 22, 2004 4:12 pm
- Location: Norway
- Contact:
I think you also need gravity and mass for the rain drops, and each rain drop should have a little difference in mass so not everyone have the same speed.
And you need a wind_direction and a wind_force varibale which pushes each rain drop toward it's direction with it's force, and the rain drops with more mass should be less affected by the wind force.
Hehe, I didn't write that very well... but whatever, good luck!
Maybe I should try to write my own rain effect and share.
Here is a little code I have for gravity:
And you need a wind_direction and a wind_force varibale which pushes each rain drop toward it's direction with it's force, and the rain drops with more mass should be less affected by the wind force.
Hehe, I didn't write that very well... but whatever, good luck!
Maybe I should try to write my own rain effect and share.
Here is a little code I have for gravity:
Code: Select all
\GravityX + Cos(GravityDirection*#RAD)
\GravityY + Sin(GravityDirection*#RAD)
\GravityForce + \Gravity
\X + \GravityX * \GravityForce ;gravity force should be a small value like 0.02
\Y + \GravityY * \GravityForce
Last edited by Joakim Christiansen on Sun Jun 18, 2006 11:13 pm, edited 1 time in total.
I like logic, hence I dislike humans but love computers.
Hmm! What about just using a particle generator for the rain?
If you do it just for the falling raindrops in a "cut" circle (the cake piece should match the player view of field obviously) I doubt the cpu load would be too much and I believe most GFX cards has hardware support for such particle effects as well?
Altough if it's a full view 3D game where the player can control the camera in a full 360 and up/down then you might need to make a hemisphere around the player using your rain particles, this would need more cpu obviously.
But the advantage would be that these particles (correct me if I'm wrong please!) would be in true 3D and not appear "painted on using 2D" as rain in many games tend to look like.
And if you want to do really a heavy storm or thunder rainshower combine this with a "camera" shader like effect (does real shaders allow "camera" effects?) that slightly warps the view so that it looks like rain/water is somewhat obscuring the "glass". Should make a impressive result.!
If you do it just for the falling raindrops in a "cut" circle (the cake piece should match the player view of field obviously) I doubt the cpu load would be too much and I believe most GFX cards has hardware support for such particle effects as well?
Altough if it's a full view 3D game where the player can control the camera in a full 360 and up/down then you might need to make a hemisphere around the player using your rain particles, this would need more cpu obviously.
But the advantage would be that these particles (correct me if I'm wrong please!) would be in true 3D and not appear "painted on using 2D" as rain in many games tend to look like.
And if you want to do really a heavy storm or thunder rainshower combine this with a "camera" shader like effect (does real shaders allow "camera" effects?) that slightly warps the view so that it looks like rain/water is somewhat obscuring the "glass". Should make a impressive result.!

