|
|
Lonnie wrote:
> Mike Kost <con### [at] povraytashcorpnet> wrote:
>> Hey all,
>>
>> I've been goofing around with .df3 files and stumbled onto a neat effect.
>> To create the attached image, I included a tree (generic one from
>> POV-Tree) and used the trace() function to probe the surface of the tree
>> and output intersection coordinates to the command line. A python script
>> processed the intersection points into a .df3 file. In a second .pov
>> file, I included the .df3 as the density in a media section to create the
>> ghost tree on the right while the original tree is on the left.
>>
>> Mike K
>> --
>> http://povray.tashcorp.net
>
> Super-Cool effect! I am doing something rather similiar to generate
> clouds
> with .df3 (the media in my last "Armillary" post uses a .df3.) I wish
> there was a way to generate binary files directly from POV - maybe there
> is
> and I have just missed it. What I need is POV's excellent random number
> generators. Right now I have to output the random stream to an ascii
> file,
> read that file into my BASIC program, and then write out the .df3. A file
> made of a cube of 1000^3 two byte integers is big enough, but in comma
> separated ascii it's immense! I can't use the BASIC random generator
> because I get those nasty plateaus.
Since I can't remember what you're processing into the .df3 besides
randomness, take with a grain of salt, but ... why don't you take advantage
of POV's noise functions? Import the large variations via a .df3 file into
a function
#declare f_data3d = function {
pattern {
density_file df3 "my.df3"
interpolate 2
}
}
Then combine this function with f_noise3d to get the variation
#declare f_final3d = function { f_data3d(x,y,z) + 0.01 *
f_noise3d(x,y,z) }
Then use this as a function into the density statement
media {
... media settings here ...
density {
function { f_final3d(x,y,z) }
color_map { ... }
}
}
If you go that route, you should be able to get the general shape using a
smaller .df3 and use Povray to add small, random variations that are
expensive to capture in .df3 files.
Mike
--
http://povray.tashcorp.net
Post a reply to this message
|
|