POV-Ray : Newsgroups : povray.binaries.scene-files : How to render 3d smoke using exisiting particle data : Re: How to render 3d smoke using exisiting particle data Server Time
18 Apr 2024 00:04:03 EDT (-0400)
  Re: How to render 3d smoke using exisiting particle data  
From: Ray
Date: 19 Apr 2013 05:45:01
Message: <web.5171108b98296338379ee910@news.povray.org>
Alain <kua### [at] videotronca> wrote:

> You may not need to use particles. Have you tried using media?
> If your smoke density data is composed of integers encoded as 1, 2 or 3
> bytes integers, it could be trivial to convert it into a .DF3 file and
> use it directly to controll the media density. Just remove the header
> and replace it by the X, Y and Z dimentions. It's also possible to read
> the data and output the DF3 file from POV-Ray.
>
> Next, make a relatively tight container, a box, sphere or cylinder as
> appropriate, add hollow and a media block.

Dear Alain,

Thanks a lot! Your suggestion gave me the direction to obtain my 3D image.

But, after googled around, I still have no idea how to convert my 3D matrices
data into a .DF3 file. Could you please give me some more details or examples
for that?

My data are organized as a three-dimension matrix in MatLab, with the first
dimension being x, second dimension y, and third dimension z. The grid size on
all three dimensions is the same. A non-zero value means the existence of smoke
at the corresponding spatial location and a larger value means more intense
smoke.

A data format example: a(:,:,1)=[0.11 0.21 0; 0.22 0.31 0; 0.61 0
0];a(:,:,2)=[0.27 0 0; 0.31 0.42 0; 0.55 0 0];a(:,:,3)=[0.18 0 0.19; 0 0.72 0;
0.21 0.38 0]

I'd really appreciate your kind help.

Ray


Post a reply to this message

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