|
![](/i/fill.gif) |
// Persistence of Vision Ray Tracer Scene Description File
// File: imagelisttexture.pov
// Vers: 3.1
// Desc: creates pigment based on images from a list file supplied by user
// Date: 2001.18
// Auth: Bob Hughes
// Mail: omn### [at] charter net
// Note: list file must be in comma delimited format and have 256 entry
limit
/* contents of images.lst need to look like this:
"something",
"another",
"etcetera",
"omega"
of course change file type below as wanted, whatever else too
*/
#version 3.1;
#declare In=0; // predefine variables
#declare N=0;
#fopen IL "c:\images.lst" read
#while (defined(IL))
#declare In=int(In+1); // count entries
#read (IL,V) // null
#end
#fclose IL // reset
#declare Images= // pigment name
pigment {gradient z // any pattern
pigment_map {
#fopen IL "c:\images.lst" read
#while (defined(IL))
#declare N=(N+1); // pre-index number
#read (IL, I)
#declare StringI=I // the file name
[N/In image_map {png StringI
filter all 0 // options
once
} ]
#end
}
}
difference { // test with CSG animation
box {0,1}
sphere {<1.75-(clock*2.5),1.75-(clock*2.5),0>,1}
pigment {Images}
translate -.5 scale 2 //rotate <90,45,0>
}
camera {
location -5*z
right x up y
angle 30
look_at 0
}
light_source {<10,10,-10>,1}
light_source {<-10,-10,-10>,1}
background {rgb 1}
Post a reply to this message
|
![](/i/fill.gif) |