Archived

This topic is now archived and is closed to further replies.

I need help! ... How to implement the diffusion of smoke?

This topic is 6274 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am now doing a project of Fire Hazard Evaluation in which the diffusion of smoke will be simulated. I tried some methods, but they are far from perfect. Could you help me? Thanks.

Share this post


Link to post
Share on other sites
Thank you for your reply. In fact, I need an idea on how to make smoke appear to diffuse graphically. Does OpenGL work?

Edited by - Roger Li on October 9, 2000 5:28:57 PM

Share this post


Link to post
Share on other sites
You could just go into 3DS MAX and create a smoke animation----I'm sure there are tutorials on that, and export an AVI or MPEG file to be used as an animated texture. I think that's the sort of thing that a lot of people do right now.

You could implement a particle system that distributes fewer particles away from the source of the smoke in some kind of linear or exponentially decaying way. This is going to be harder to develop on the coding side.

If you want to get *really* sophisticated and plan on using a billboard polygon or two crossing polygons, you could possibly make the smoke appear diffuse graphically by using the 2D linear heat equation (e.g., the physics behind dissipative processes) to generate a texture coordinate into some smoke texture. For example, at the source of the smoke the texture value would be 0 (heavy, nearly opaque smoke), and a value of 1 at some distance away from the source (light, almost invisibly transparent smoke). The heat equation is quite easy and fast to simulate and can give you the dissipation of the smoke over time---this is a way to get a cheap smoke plume that evolves over time. Of course, there are more words required to describe how to actually do it. You'd want to precompute the dissipation I imagine, for example, for your application, rather than compute it in real time. You're just looking for a nice effect, aren't you? If you're interested in realism and need to simulate the smoke depending on the conditions that lead to it, then real-time simulation is possible with some constraints. Also, adding a wave equation term can add realism to the motion of the plume (as opposed to just the dissipation of smoke within a plume that doesn't move that you get from the pure heat equation). Actually, the wave motion is required to get true "diffusion". Diffusion is dispersion (heat equation effect) and dissipation (wave equation effect) combined.

Shouldn't matter if you use OpenGL, Direct3D, or Bob's 3D API, as long as it supports transparent textures.

I know I rambled about something that sounds complex. All you can expect to do if you want the *very* sophisticated approach I mentioned is a rough rough approximation to the real processes----something that looks good but isn't actually the real complete physics. If you ask nice, I might give you some clues about the heat equation and wave equation, since I know all about them. But I don't have time to give you a complete answer.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
email: grhodes@sed.ara.com

Edited by - grhodes_at_work on October 13, 2000 4:34:13 PM

Share this post


Link to post
Share on other sites