POV-Ray : Newsgroups : povray.general : Smoke.. Server Time
28 Nov 2024 17:47:02 EST (-0500)
  Smoke.. (Message 1 to 3 of 3)  
From: benighted
Subject: Smoke..
Date: 2 Oct 2006 15:25:00
Message: <web.4521676155b3ad66a77935a80@news.povray.org>
Hi,

I'm working on c++ program that calculates fluid dynamics and now I have a
question in how to best render the smoke (just a first test, I'll develope
it to a more general fluid dynamics engine later on) on povray. The
simplest idea I was thinking is to use a union (or merge) of boxes that
each has the transparency that is proportional to the density of smoke in
the corresponding point in the calculation grid. And after that improve the
effects by using media in the boxes and so on.. But i guess there are better
ways of doing it and thought I'd ask =). The thing is that it'll be a lot of
boxes, of one calculates a grid that is 200x200x200 points one has to draw 8
000 000 boxes, although in reality I can shink that number in the output to
maybe 1 000 000 by not including the ones with a density = 0 (or close to
it)...

So what do you think?

You can se some output in 2d (the calculations I'm currently doing is in 3d)
from the program (and a small test program for win32) on my page at:

http://web.comhem.se/~u13140236/FD/FD.html

If you try the software, the buttons to remember (as it as of yet has no
documentation) are "W" to toggle wind, "S" to toggle smoke, and "A" to
toggle the flow lines (and one can also controll the windspeed by clicking
"up" and "down" arrows on the keyboard). I also think the version available
on the page does not have all the features that are shown in some of the
screenshots (like that the shades are smoothed between the point and so on,
but then maybe it has ;). I can't test it right now as I'm in my linux
enviroment right now)

Regards
/Jani


Post a reply to this message

From: Warp
Subject: Re: Smoke..
Date: 2 Oct 2006 23:20:26
Message: <4521d6fa@news.povray.org>
benighted <ben### [at] comhemse> wrote:
> The thing is that it'll be a lot of
> boxes, of one calculates a grid that is 200x200x200 points one has to draw 8
> 000 000 boxes

  You probably want to use a df3 file with media instead of that.

-- 
                                                          - Warp


Post a reply to this message

From: Alain
Subject: Re: Smoke..
Date: 3 Oct 2006 22:20:42
Message: <45231a7a$1@news.povray.org>
benighted nous apporta ses lumieres en ce 02/10/2006 15:24:
> Hi,
> 
> I'm working on c++ program that calculates fluid dynamics and now I have a
> question in how to best render the smoke (just a first test, I'll develope
> it to a more general fluid dynamics engine later on) on povray. The
> simplest idea I was thinking is to use a union (or merge) of boxes that
> each has the transparency that is proportional to the density of smoke in
> the corresponding point in the calculation grid. And after that improve the
> effects by using media in the boxes and so on.. But i guess there are better
> ways of doing it and thought I'd ask =). The thing is that it'll be a lot of
> boxes, of one calculates a grid that is 200x200x200 points one has to draw 8
> 000 000 boxes, although in reality I can shink that number in the output to
> maybe 1 000 000 by not including the ones with a density = 0 (or close to
> it)...
> 
> So what do you think?
> 
> You can se some output in 2d (the calculations I'm currently doing is in 3d)
> from the program (and a small test program for win32) on my page at:
> 
> http://web.comhem.se/~u13140236/FD/FD.html
> 
> If you try the software, the buttons to remember (as it as of yet has no
> documentation) are "W" to toggle wind, "S" to toggle smoke, and "A" to
> toggle the flow lines (and one can also controll the windspeed by clicking
> "up" and "down" arrows on the keyboard). I also think the version available
> on the page does not have all the features that are shown in some of the
> screenshots (like that the shades are smoothed between the point and so on,
> but then maybe it has ;). I can't test it right now as I'm in my linux
> enviroment right now)
> 
> Regards
> /Jani
> 
> 
As Warp said, you should be beter using DF3. Using boxes, you'll face another 
problem: trace level! max_trace_level have a maximum value of 256. If you exeed 
that value, you get black. It will also get prety slow.
Using a single box filled by a media and the DF3 file to controll it's density, 
is probably faster. You may need to use a high sample value, around 300 or more.

-- 
Alain
-------------------------------------------------
Hardware, n.: The parts of a computer system that can be kicked.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.