Skip to main content
GameDev.net gamedev.net
🔒 Locked

making smoke

Started by daniel_i_l Apr 26, 2006 at 12:56 AM 6 replies 1k views
Original Post
daniel_i_l
daniel_i_l
I'm trying to make smoke with my particle engine. I'm using a tga tex with an alpha channel. I'm coloring the particles in dark colors: glColor4f(c,c,c, a); c = (rand()%300)/1000.0f; and a decreases over time. depth writing is off. and this is what it looks like with glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); Photobucket - Video and Image Hosting with glBlendFunc(GL_SRC_ALPHA,GL_ONE); everything is white, or not visible at all. How can I make the smoke more realistic?
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
Sneftel
Sneftel
Good particle smoke requires that a significant number of particles be overlapping at any given point. Increase the radius of your points, and decrease their alpha.
daniel_i_l
daniel_i_l
Thanks for that advice, I think it looks better now:
Photobucket - Video and Image Hosting
any other sudgestions?
Thanks.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
Sneftel
Sneftel
Yeah: it's way too thick. Remember: smoke disperses horizontally as well as vertically. Decrease the alpha some more, and add horizontal dispersion.
Rasmadrak
Rasmadrak
Also... smoke grows bigger as it rises up in the air. (What he above said)

Start small - grow big :D
"Game Maker For Life, probably never professional thou." =)
daniel_i_l
daniel_i_l
Hows this:
Photobucket - Video and Image Hosting
Thanks.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
taby
taby
Your diffusion looks great!

Do you think that your fuel source would be a black body emitting visible radiation?

Why not put a hemispherical boundary around that and tint the smoke particles within it accordingly, inverse sqrt fall-off is the general method.

However, you could also do a volumetric trace from each particle to the hemisphere's centre, counting the number of collisions with other particles along the way.

Tracing from the centre of the hemisphere toward the particle would work equally as efficient, I believe.

A bounding sphere for the particle object could also be used to determine incidental opacity by measuring the length of the line between where the ray enters and exits the sphere. Light absorption per-particle then becomes a matter of how long in time the light had to travel through the particle. Light is not infinitely fast. :)
Sneftel
Sneftel
Quote:
Original post by daniel_i_l
Hows this:
Photobucket - Video and Image Hosting
Thanks.


Looking good. There's still some hard edges around the smoke particles, though. Make sure the alpha of the texture itself fades to transparent, rather than having a hard border.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.