![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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?
Post a reply to this message
Attachments:
Download 'lightbox222.png' (547 KB)
Preview of image 'lightbox222.png'
![lightbox222.png](/povray.binaries.images/attachment/%3Cweb.42d164ad37fba3c8328c25a60%40news.povray.org%3E/lightbox222.png?ttop=441697&toff=5150&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Mike Kost <con### [at] povray tashcorp net> 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
Attachments:
Download 'testdensity.jpg' (8 KB)
Preview of image 'testdensity.jpg'
![testdensity.jpg](/povray.binaries.images/attachment/%3Cweb.42d4f290f5ca07c6328c25a60%40news.povray.org%3E/testdensity.jpg?ttop=441697&toff=5150&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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] povray tashcorp net> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I ALMOST started this in Python, but decided it would be like killing a gnat
with a jack-hammer, and besides I hadn't really learned Just BASIC yet -
very nice and very free. I'd like to play with df3's in MSW Logo (3D
spiro-technics) but haven't figured out it's i/o yet - goofy docs. I'll
probably step up to python eventually with this, if only for the power of
it's math module.
Mike Kost <con### [at] povray tashcorp net> wrote:
> 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] povray tashcorp net> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |