#### 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 6489 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 on other sites
Do you want an idea on how to make smoke appear to diffuse graphically? or do you actually want information on the diffusion of smoke ( the physics? )?

##### 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 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

1. 1
2. 2
Rutin
24
3. 3
4. 4
JoeJ
18
5. 5

• 14
• 19
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631761
• Total Posts
3002177
×