|
|
Sally wrote:
> First question: is there a way to change the output file name from
> within a POV file... perhaps during a preprocessor directive? Doing it
> from within an INI will not work either as I want the output file to
> depend on the clock variable if possible.
You are probably trying to do something really ugly that would better be
done in a different way. The clock variable can't be set from within
the POV-SDL file so there is no reason to set the output file name
depending on it from there either. Both can only be specified as
command line/ini file options.
> Another question is if I can somehow access a list of files in a
> directory. The purpose of this would be to put 100 different textures
> into a directory and loop through rendering a single script/object but
> using a different texture each time. Hopefully this could be done again
> with the clock variable, if not, what is the best way to do this without
> having to manually type in all the files one by one?
There are dozens of possible ways to accomplish this, the most simple
probably is (as shell script, should be possible as Windows batch file
as well):
for TEXTURE in *.jpeg ; do
echo "#declare TEXTURE_FILE=\"$TEXTURE\"" > image_file.inc
povray -iscene.pov -o${TEXTURE}_pov.png
done
Where scene.pov of course #includes image_file.inc and uses TEXTURE_FILE
then.
Using the internal animation loop of POV-Ray would be possible as well
but somewhat more complicated (generating an array of image file names
would be possible as well as writing a file list to be read via #read).
Christoph
--
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 01 May. 2004 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|