POV-Ray : Newsgroups : povray.pov4.discussion.general : Request for *.df4 format (ASCII text based) : Re: Request for *.df4 format (ASCII text based) Server Time
22 Jun 2024 23:05:32 EDT (-0400)
  Re: Request for *.df4 format (ASCII text based)  
From: bapt
Date: 27 Aug 2010 11:25:00
Message: <web.4c77d867f13a83cff7b786010@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 27.08.2010 12:35, schrieb bapt:
>
> > Is there somewhere I could find a minimal example of what I should export as a
> > density file, some specification of what coordinates and values I should use to
> > see something within my box?
>
> > I'm using R to create a table of values, with the following script
> >
> > N<- 100
> > xx<- seq(0,1, length=N)
> > d<- expand.grid(x=xx,y=xx,z=xx)
> > d$t<- runif(nrow(d), 0, 255) # random values
> >
> > cat(file="data.dat", "1 1 1\n")
> > write.table(d,file="data.dat",row.names = F,
> >              col.names = F,append=T)
>
> I'm sorry, I have no idea what "R" is.
>
> To make sure what I told you would indeed to the trick, I generated a
> sample density file by adding the following additional statements at the
> beginning of the scene file you provided:
>
>    #include "arrays.inc"
>
>    #declare A = array[2][2][2] {
>      { { 0.1, 0.2 }, { 0.3, 0.4 } },
>      { { 0.5, 0.6 }, { 0.7, 0.8 } }
>    }
>
>    ARRAYS_WriteDF3(A, "data.df3", 8)
>
> (using POV-Ray 3.7 beta 38; it won't work with POV-Ray 3.6)
>
> This would correspond to a 2x2x2 grid, with cells filled as follows:
>
>    0,0,0   26
>    0,0,1   51
>    0,1,0   77
>    0,1,1  102
>    1,0,0  153
>    1,0,1  179
>    1,1,0  204
>
> This does work - for example - with absorption <1,1,1>*30 on a white
> background, or emission<1,1,1>*10 on a black background.
>
> If you still can't get this to work, then something's broken in your
> workflow. Otherwise, you're just still too cautious about the absorption
> values to get your own density files working. Be bold to try out some
> insanely large values - you can't physically break anything ;-)

Damn, it's so close but... no luck. I cannot install POV-Ray 3.7 for some reason
(Mac) and the values above run through the c++ script still give me a blank
page. Would you mind posting the df3 and pov files so I can rule out the
conversion and know for sure that my povray is broken? I have cranked up the
absorption well above reasonable values and it's still all white.

Thanks,

baptiste


Post a reply to this message

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