POV-Ray : Newsgroups : povray.binaries.images : Media Experiments : Re: Media Experiments Server Time
5 Nov 2024 16:39:40 EST (-0500)
  Re: Media Experiments  
From: Mike Kost
Date: 13 Jul 2005 15:22:59
Message: <42d56a13@news.povray.org>
Lonnie,

Very nice!

I thought it was funny that I was pondering on .df3's when you posted. This
got me thinking, so I cranked out a python class to import and export .df3
files (yes, I'm a python fan - the interactive prompt rules). Right now
it's on my website http://povray.tashcorp.net/tutorials/script_df3/

Mike
--
http://povray.tashcorp.net

Lonnie wrote:
> Mike Kost <con### [at] povraytashcorpnet> wrote:
>> Lonnie wrote:
>> > I am growing a bit more bold with media and photon mapping, but density
>> > files elude me.  What kind of editor do I use to produce one, or must
>> > it be done with a programming language?
>>
>> As best I've found so far, you've got to construct a density file using a
>> self-written program. There's a few things that are a bit more advanced,
>> but it's not a nice GUI by a long shot. Most of the material out on the
>> web is fairly self-driven & command line. Here's a few I've stumbled on
>> in the past:
>>
>> http://www.povray.org/documentation/view/3.6.1/374/
>>     (DF3 File format vaguely described)
>> http://astronomy.swin.edu.au/~pbourke/povray/df3/
>>     (C code snippet)
>> http://www.oyonale.com/ressources/english/sources13.htm
>>     (Using .df3 files to make clouds)
>>
>> Mike K
>> --
>> http://povray.tashcorp.net
> 
> Thanks Mike.  The cloud site was helpful and interesting.  I have used
> JustBASIC 1.0 to write a df3 file that produces random density (kinda like
> static on a TV, but in 3D.)  Most programming languages would do, as long
> as they can write individual bytes in a binary file.
> 
>   open "myfile.df3" for binary as #myfile
> 
>   print #myfile, chr$(0)  'This is the header, space is 20x20x20, or 8000
> bytes
>   print #myfile, chr$(20)
>   print #myfile, chr$(0)
>   print #myfile, chr$(20)
>   print #myfile, chr$(0)
>   print #myfile, chr$(20)
> 
>   for t=1 to 8000         'This writes the body
>       print #myfile, chr$(int(rnd(1)*255))
>   next
>   close #myfile
> 
> Imagine my suprise when this worked on the first try.


Post a reply to this message

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