Advertisement

How can i make some rain ?

Started by February 10, 2001 04:53 AM
13 comments, last by penetrator 23 years, 9 months ago
tried to dance around a fire spelling magic words but didn''t work ... eh eh give me some advices please ...
you can just use a simple line draw function that is drawn from the your highest Y point to base X, or use a floating sprite of a rain droplet.

Advertisement
Wouldn''t a particlesystem be a nice way to implement this?
(I mean, same thing as the "Snow" effect..?)
______________________________Only dead fish go with the main-stream.
If you want, check out my October Challenge entry (October Sky).
It uses the lines method that was mentioned above, but also takes into account wind. When writing it, I found that uing the lines was many times faster than texturing particles. It may not do for snow, but at least it LOOKS like rain.
Anyway, it all depends on what you want it for.


Contact me
[email=JValentine_13@hotmail.com]contact[/email]
I have a snow effect in my engine at www.laeuchli.com/jesse/
I could proably be made into rain(havn''t tested it yet though..)
You can use blended particles that are textured to make rain(worked for me)
Advertisement
Hi all


Sorry for not giving any advice, But I just had to say if you wish to see weather effects done the way we all wish we could, go take a look at the Metal Gear Solid 2 in game movie footage, IGN have a lot of video if you like. The weather effects Most notably the RAIN are well you have to see it to belief it!! Don’t worry though there are 250 programmers who have spent about 2-3 years on this title and they have gone to the Metal with the Playstation 2, Those vector units sure can do some amazing things !!


3DG


PS I would use small 32x32 texes for rain, billboarded and blended(possibly) I will have to give this a try!!
		glDisable( GL_LIGHTING );		glDisable( GL_TEXTURE_2D );		glColor4f( 1.0f, 1.0f, 1.0f, 0.5f );		for ( int i = 0; i < ( 22000-time )/10; i++ )		{			GLfloat x = ( rand()*GROUND_SIZE*2.0f )/RAND_MAX - GROUND_SIZE;			GLfloat y = ( rand()*GROUND_SIZE*2.0f )/RAND_MAX - 65;			GLfloat z = ( rand()*GROUND_SIZE*2.0f )/RAND_MAX - GROUND_SIZE;			GLfloat length = ( rand()*10.0f )/RAND_MAX;			glBegin( GL_LINES );				glVertex3f( x, y, z );				glVertex3f( x-length, y-length, z );			glEnd();		}		glEnable( GL_LIGHTING );		glEnable( GL_TEXTURE_2D ); 


Works great. You''ll want to change the constants, perhaps even do it in orthagraphic view without z if you want it fullscreen. The loop diminishes rain over time (as the sun is coming out


~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
~~~Cheers!Brett PorterPortaLib3D : A portable 3D game/demo libary for OpenGLCommunity Service Announcement: Read How to ask questions the smart way before posting!
think particle is too slow... perhaps better to draw simple lines... thanks Brad for is code, i''ll try soon, and thank you all for your support ...

quote:
think particle is too slow... perhaps better to draw simple lines... thanks Brad for is code, i''ll try soon, and thank you all for your support ...

you are going to have to use a particle engine no matter what your rain drops look like.

HHSDrum@yahoo.com www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911

This topic is closed to new replies.

Advertisement