POV-Ray : Newsgroups : povray.general : Specs for df3- files Server Time
31 Jul 2024 00:25:12 EDT (-0400)
  Specs for df3- files (Message 1 to 10 of 10)  
From: minzi0815
Subject: Specs for df3- files
Date: 7 May 2008 09:40:01
Message: <web.4821b0c4bae86795a20042b0@news.povray.org>
Hi,

i am looking for a detailed specification of df3 - files in the web for a few
days now - without success yet. Can someone give me a hint ? Thank you in
advance !


Post a reply to this message

From: Warp
Subject: Re: Specs for df3- files
Date: 7 May 2008 09:50:44
Message: <4821b3b4@news.povray.org>
minzi0815 <mar### [at] eumetsatint> wrote:
> i am looking for a detailed specification of df3 - files in the web for a few
> days now - without success yet. Can someone give me a hint ? Thank you in
> advance !

  Did you try the official documentation?

http://povray.org/documentation/view/3.6.1/374/

-- 
                                                          - Warp


Post a reply to this message

From: minzi0815
Subject: Re: Specs for df3- files
Date: 8 May 2008 03:15:00
Message: <web.4822a7bb8637a0d8c32955910@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> minzi0815 <mar### [at] eumetsatint> wrote:
> > i am looking for a detailed specification of df3 - files in the web for a few
> > days now - without success yet. Can someone give me a hint ? Thank you in
> > advance !
>
>   Did you try the official documentation?
>
> http://povray.org/documentation/view/3.6.1/374/
>
> --
>                                                           - Warp
I did, but this is not a detailed spec really ...


Post a reply to this message

From: Chris B
Subject: Re: Specs for df3- files
Date: 8 May 2008 04:07:49
Message: <4822b4d5$1@news.povray.org>
"minzi0815" <mar### [at] eumetsatint> wrote in message 
news:web.4822a7bb8637a0d8c32955910@news.povray.org...
> Warp <war### [at] tagpovrayorg> wrote:
>> minzi0815 <mar### [at] eumetsatint> wrote:
>> > i am looking for a detailed specification of df3 - files in the web for 
>> > a few
>> > days now - without success yet. Can someone give me a hint ? Thank you 
>> > in
>> > advance !
>>
>>   Did you try the official documentation?
>>
>> http://povray.org/documentation/view/3.6.1/374/
>>
>> --
>>                                                           - Warp
> I did, but this is not a detailed spec really ...
>

Hi Marcus,

It seems to me to be almost complete. It doesn't seem to indicate the 
sequencing of the data block, so I'd assume that the first block of data 
would be used for the first row of values in X etc.  If my assumption is 
correct then (in Hex):

0002 0003 0004 0F A5 ... followed by another 22 bytes of data, would give 
you a 2x3x4 8-bit media density pattern with the first value '0F' (15) 
being the density at <0,0,0> and the second value of A5 (165) being the 
density at <1,0,0>, the third data value would be used for <0,0.5,0> etc. 
until it fills in a 2x3x4 block from <0,0,0> to <1,1,1>. If you wanted a 
16-bit file you'd have 2 bytes per voxel, so you'd need another 46 bytes of 
data.

Is this any help?
Otherwise could you add a few words about what you're trying to do or where 
you need additional detail?

Regards,
Chris B.


Post a reply to this message

From: minzi0815
Subject: Re: Specs for df3- files
Date: 9 May 2008 08:55:00
Message: <web.482448d48637a0d8c32955910@news.povray.org>
O.k., let me try to reexplain:

The first three bytes define a box and represent the amount of values.
So the numbers 10 10 and 10 (decimal) would define 1000 values. If the values
are given in 8, 16 or 32 bit is defined by the size of the df3-file ( -6 Bytes,
of course )

The values, that follow up are given the the following order:

0 0 0
1 0 0
2 0 0
..
..
10 0 0
0 1 0
1 1 0
....

Is that correct, so far ?

"Chris B" <nom### [at] nomailcom> wrote:
> "minzi0815" <mar### [at] eumetsatint> wrote in message
> news:web.4822a7bb8637a0d8c32955910@news.povray.org...
> > Warp <war### [at] tagpovrayorg> wrote:
> >> minzi0815 <mar### [at] eumetsatint> wrote:
> >> > i am looking for a detailed specification of df3 - files in the web for
> >> > a few
> >> > days now - without success yet. Can someone give me a hint ? Thank you
> >> > in
> >> > advance !
> >>
> >>   Did you try the official documentation?
> >>
> >> http://povray.org/documentation/view/3.6.1/374/
> >>
> >> --
> >>                                                           - Warp
> > I did, but this is not a detailed spec really ...
> >
>
> Hi Marcus,
>
> It seems to me to be almost complete. It doesn't seem to indicate the
> sequencing of the data block, so I'd assume that the first block of data
> would be used for the first row of values in X etc.  If my assumption is
> correct then (in Hex):
>
> 0002 0003 0004 0F A5 ... followed by another 22 bytes of data, would give
> you a 2x3x4 8-bit media density pattern with the first value '0F' (15)
> being the density at <0,0,0> and the second value of A5 (165) being the
> density at <1,0,0>, the third data value would be used for <0,0.5,0> etc.
> until it fills in a 2x3x4 block from <0,0,0> to <1,1,1>. If you wanted a
> 16-bit file you'd have 2 bytes per voxel, so you'd need another 46 bytes of
> data.
>
> Is this any help?
> Otherwise could you add a few words about what you're trying to do or where
> you need additional detail?
>
> Regards,
> Chris B.


Post a reply to this message

From: Chris B
Subject: Re: Specs for df3- files
Date: 9 May 2008 12:22:40
Message: <48247a50$1@news.povray.org>
"minzi0815" <mar### [at] eumetsatint> wrote in message 
news:web.482448d48637a0d8c32955910@news.povray.org...
> O.k., let me try to reexplain:
>
> The first three bytes define a box

Actually the first six bytes (3x16 bit = 3x2 Byte numbers).
Each Byte represents a number from hex'00' to hex'FF' (0-255 in decimal).
So each double Byte number can represent a number in the range hex'0000' to 
hex'FFFF' (0-65535 in decimal), giving a maximum file/box width, height and 
depth.

> and represent the amount of values.
> So the numbers 10 10 and 10 (decimal) would define 1000 values.

Yes. I assume from the docs that '0' is not used, so to get 10x10x10 or 1000 
values you would use '000A000A000A' in hex.

> If the values
> are given in 8, 16 or 32 bit is defined by the size of the df3-file ( -6 
> Bytes,
> of course )
>
> The values, that follow up are given the the following order:
>
> 0 0 0
> 1 0 0
> 2 0 0
> ..
> ..
> 10 0 0
> 0 1 0
> 1 1 0
> ....
>
> Is that correct, so far ?
>

If I understand your notation correctly, then nearly. You need to count 
either from 0-9 or from 1-10. You've used 0-10 which gives 11 values per 
row/column/layer.

The 10x10x10 box would then be scaled to fit into the box from <0,0,0> to 
<1,1,1> and you'd need to scale it to suit your purposes from there.

Regards,
Chris B.


Post a reply to this message

From: Chris B
Subject: Re: Specs for df3- files
Date: 9 May 2008 15:02:49
Message: <48249fd9@news.povray.org>
Hi Again Marcus,

Just to check it out I typed in a simple DF3 file in Hex:

00 02 00 02 00 02
FF 00 00 00 00 00 00 FF

and rendered it using:

camera {location <0.5,0.5,-1> look_at 0.5}
light_source {   <-4,75 ,-10   >, rgb 1}

box {<0,0,0>, <1,1,1>
  pigment { rgbt 0.9 }
  interior {
    media {
      emission <1,1,1>
      density {
         density_file df3 "ngtest24.df3"
      }
    }
  }
  hollow
}

The first 'FF' appears bottom, near left. The second top, far right.

Regards,
Chris B.


Post a reply to this message

From: minzi0815
Subject: Re: Specs for df3- files
Date: 14 May 2008 05:25:00
Message: <web.482aae968637a0d8c32955910@news.povray.org>
Chris,


yes, this did help. Looks like I understood the format and I have already
written a little perl-script to generate random numbers in a desity-file. If
you're interested:

#!/usr/bin/perl


open(DF3OUT,"> mmtest.df3");
binmode(IF);

$x=0; $y=0; $z=0;


$xval=pack "n",1000;
$yval=pack "n",1000;
$zval=pack "n",1000;

print( DF3OUT $xval,$yval,$zval );


while( $z < 1000 ){
        $y=0;
        while( $y < 1000 ){
                $x=0;
                while( $x < 1000 ){
                        print( DF3OUT pack "n",int(rand 65535)+1);
                        $x=$x+1;
                }
                $y=$y+1;
        }
        $z=$z+1;
}


close(DF3OUT);

....also I took your example from below to display the values.
Works all quite nice.

As I am quite new in Povray, I have two more questions:

The original plan was to make the values looking like a cloud. I think there
should be a way to let povray generate clouds from the values.

Also I'd like povray to differ the values ( currently random-numbers) by
displaying them in different colors...

Thank in advance

Marcus


"Chris B" <nom### [at] nomailcom> wrote:
> Hi Again Marcus,
>
> Just to check it out I typed in a simple DF3 file in Hex:
>
> 00 02 00 02 00 02
> FF 00 00 00 00 00 00 FF
>
> and rendered it using:
>
> camera {location <0.5,0.5,-1> look_at 0.5}
> light_source {   <-4,75 ,-10   >, rgb 1}
>
> box {<0,0,0>, <1,1,1>
>   pigment { rgbt 0.9 }
>   interior {
>     media {
>       emission <1,1,1>
>       density {
>          density_file df3 "ngtest24.df3"
>       }
>     }
>   }
>   hollow
> }
>
> The first 'FF' appears bottom, near left. The second top, far right.
>
> Regards,
> Chris B.


Post a reply to this message

From: Chris B
Subject: Re: Specs for df3- files
Date: 14 May 2008 06:40:03
Message: <482ac183$1@news.povray.org>
"minzi0815" <mar### [at] eumetsatint> wrote in message 
news:web.482aae968637a0d8c32955910@news.povray.org...
> Chris,
>
> As I am quite new in Povray, I have two more questions:
>
> The original plan was to make the values looking like a cloud. I think 
> there
> should be a way to let povray generate clouds from the values.
>
> Also I'd like povray to differ the values ( currently random-numbers) by
> displaying them in different colors...
>

Hi Marcus,

Paul Bourke has a short tutorial on using DF3 files at
http://ozviz.wasp.uwa.edu.au/~pbourke/modelling_rendering/df3/.

The settings he uses in his file 'example.pov' create more uniform, 
cloud-like forms  than my example, even from quite small files (my example 
set clearly defined edges to help illustrate the sequencing of the file). 
His tutorial also seems to shows how to use color_maps to vary the colours 
and how to get the media to cast shadows in a cloud-like way.

There are quite a few POV-Ray cloud tutorials and macros around that might 
also be of interest to you.

Regards,
Chris B.


Post a reply to this message

From: minzi0815
Subject: Re: Specs for df3- files
Date: 15 May 2008 04:50:00
Message: <web.482bf8448637a0d8c32955910@news.povray.org>
All right. thank's a lot !!

"Chris B" <nom### [at] nomailcom> wrote:
> "minzi0815" <mar### [at] eumetsatint> wrote in message
> news:web.482aae968637a0d8c32955910@news.povray.org...
> > Chris,
> >
> > As I am quite new in Povray, I have two more questions:
> >
> > The original plan was to make the values looking like a cloud. I think
> > there
> > should be a way to let povray generate clouds from the values.
> >
> > Also I'd like povray to differ the values ( currently random-numbers) by
> > displaying them in different colors...
> >
>
> Hi Marcus,
>
> Paul Bourke has a short tutorial on using DF3 files at
> http://ozviz.wasp.uwa.edu.au/~pbourke/modelling_rendering/df3/.
>
> The settings he uses in his file 'example.pov' create more uniform,
> cloud-like forms  than my example, even from quite small files (my example
> set clearly defined edges to help illustrate the sequencing of the file).
> His tutorial also seems to shows how to use color_maps to vary the colours
> and how to get the media to cast shadows in a cloud-like way.
>
> There are quite a few POV-Ray cloud tutorials and macros around that might
> also be of interest to you.
>
> Regards,
> Chris B.


Post a reply to this message

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