|
|
Hello, here is a short example file :
camera{ location z*50 look_at <0,0,0> }
light_source{ <20,20,50> rgb <1,1,1> }
#declare Name = concat("\"FR",str(11,0,0),".tga\"") // this should
be "FR11.tga"
sphere {0, 10
pigment {image_map {tga "FR11.tga" map_type 1 interpolate 2 transmit
255, 1.0}}
// pigment {image_map {tga Name map_type 1 interpolate 2 transmit 255,
1.0}} //That's what I wanna write!
finish {ambient 0.3 diffuse .8} }
/* Hello,
please have a look at this very short pov.file
I'm working with Megapov and I'm wondering about strings:
Why can't I write Name instead of "FR11.tga" inside the image
map.
I like to change the number of the picture (11 to 12 to 13 etc.)
for loading different pics during an animation !!
How can I do this ?
Can I do something similar ?
Thank You for thinking it over.
Best wishes
Luck and Blessing
Ruediger Geisler
*/
Post a reply to this message
|
|
|
|
[snip]
> I'm working with Megapov and I'm wondering about strings:
>
> Why can't I write Name instead of "FR11.tga" inside the image
> map.
> I like to change the number of the picture (11 to 12 to 13 etc.)
> for loading different pics during an animation !!
> How can I do this ?
> Can I do something similar ?
The quotes are required around the image filename to identify it as a
string. When you use a string variable, though, the quotes are not
required. If you remove them from your declaration, you should find that
things work as expected. Also, if you want to change the file number
through the animation, you can use the clock variable:
#declare Name = concat("FR", str(1 + clock*19, -2, 0));
... image_map {tga Name ....
This uses files from FR01.tga to FR20.tga through the course of the
animation (from clock = 0 to 1). Note the use of the -2 in the str()
function, to pad out the file numbers. Also, it is not necessary to specify
the file extension if it matches the type of file (tga, in this case).
Post a reply to this message
|
|