Sign in to follow this  
Great_White

Representing smoke density in a grid.

Recommended Posts

Great_White    148
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.

Share this post


Link to post
Share on other sites
taby    1265
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.

Share this post


Link to post
Share on other sites
Great_White    148
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.

Share this post


Link to post
Share on other sites
taby    1265
Sorry about that. You've seen these?

[url="http://http.developer.nvidia.com/GPUGems/gpugems_ch39.html"]http://http.develope...ugems_ch39.html[/url]

[url="http://prideout.net/blog/?p=60"]http://prideout.net/blog/?p=60[/url]

"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: [url="http://users.cms.caltech.edu/%7Ekeenan/project_fluid.html"]http://users.cms.cal...ject_fluid.html[/url] (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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this