POV-Ray : Newsgroups : povray.general : changing output file in script : Re: changing output file in script Server Time
3 Aug 2024 04:15:03 EDT (-0400)
  Re: changing output file in script  
From: Alain
Date: 13 May 2004 19:12:28
Message: <40a400dc@news.povray.org>
Sally nous apporta ses lumieres ainsi en ce 2004/05/13 17:59... :

>I dont need to change the clock variable in the .pov file, its changing
>normally as I want it, but I want the texture to depend on it. I could
>have a huge "switch" like statement with each filename, but then it
>doesn't adapt to each file automatically.
>
>And I'd prefer not to use batch files but its so far the only solution I
>have seen (and ty for that solution by the way).
>
>
>  
>
Name your images files with names such as: Pic00.png, pic01.png ... 
Pic99.png
In your cene, use a string concatenation: #local PicName = 
concat("Pic",str(int(clock *100),-2,0),".png");
//I put the int() to ensure strictly integer values.
//I use a lenght of -2 in the str() to pad to 2 characters with leading 0s.
Then use PicName in your texture.
It should use your images in sequance, one per frame for your 100 
frames. If you change to 200 frames, each images will be used twice. If 
you use less frames, then some images will be skipped.

Alain


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.