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

Representing smoke density in a grid.

Started by Great_White Apr 6, 2012 at 11:56 AM 2 replies 1.8k views
Original Post
Great_White
Great_White
Hi all,

So far I've been working on my own implementation of smoke simulator based on the seminal paper of Jos Stam's "Stable Fluids". I understand all the numerical simulation methods discussed in the paper. However one thing bothering me is that in the paper, it is not mentioned about how to represent the smoke's initial density in a 3D grid structure. If you can enlighthen me on this subject, I'll be really glad.

Thanks in advance.
"A human being is a part of a whole, called by us,universe, a part limited in time and space. He experiences himself, his thoughts and feelings as something separated from the rest... a kind of optical delusion of his consciousness. This delusion is a kind of prison for us, restricting us to our personal desires and to affection for a few persons nearest to us. Our task must be to free ourselves from this prison by widening our circle of compassion to embrace all living creatures and the whole o
taby
taby
See "Real-Time Fluid Dynamics for Games" by Stam

http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/GDC03.pdf

There is an accompanying source code on his website.

Oh.... Also, nice anti-solipsistic sig.
Great_White
Great_White
I've already looked Stam's code. It was written for a 2D grid and it links density injection to the user input via mouse clicks. What I want to do is to inject density sources in a 3D grid. In GPU Gems-3, it mentions that Gaussian splats for the density source. But I am not sure of it.
"A human being is a part of a whole, called by us,universe, a part limited in time and space. He experiences himself, his thoughts and feelings as something separated from the rest... a kind of optical delusion of his consciousness. This delusion is a kind of prison for us, restricting us to our personal desires and to affection for a few persons nearest to us. Our task must be to free ourselves from this prison by widening our circle of compassion to embrace all living creatures and the whole o
taby
taby
Sorry about that. You've seen these?

http://http.develope...ugems_ch39.html

http://prideout.net/blog/?p=60

"Texture Splats for 3D Scalar and Vector Field Visualization" by Crawfis, Max.

It seems that when these papers talk about Gaussian or quadratic or whatever functions, they're referring to the opacity falloff of the splat with regard to radial distance from the centre of the splat. As for how they use this to inject smoke, I am also at a loss as to what they're referring to. Sorry. Perhaps they're just obtaining the density field from splats (instead of the other way around, like you normally would do when rendering). Perhaps if you wrote to the authors, they could explain it a little.

FWIW, I just used a ray marching technique for my "smoke" because I was lazy. This is what I was inspired by: http://users.cms.cal...ject_fluid.html (I'm sure that you recognize the author). The hardest part was determining ray-box collision. In other words, texture splatting is not the only way to go.

Wish I could have helped you more.

Topic Locked

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

Sign in to reply to this topic.