|
|
"Inquisitor" <dec### [at] sybasecom> wrote in message
news:web.4a4ce3cbaa245cc6182abe670@news.povray.org...
> Say I have a scenario where I want to create an animation. say 60 seconds.
> And.
> I want to have a smooth video. say 30 frames/second. So, I'd have.
>
> Initial_Clock = 0
> Final_Clock = 60
>
> Initial_Frame = 0
> Final_Frame = 1800
>
> Also, it takes 6 hours to render a frame! Hmmm. 1.3 years.
>
> I'd like to do 2 things.
> (1) I'd like to be able to have it first generate at one second intervals.
> so I
> can see a story board of the entire video with 60 frames. Simple enough.
> set
> Final_Frame = 60. Well, I don't want to have to re-render those 60 frames
> when
> I do the rest, so I want the files to be numbered Xxxx0000, Xxxx0030,
> Xxxx0060.
> etc.
> (2) And later, I'd like multiple computers to be connected to a common
> network
> directory (with my POV ray scene files) yet have separate ini files. This
> way
> they all dump their images into the same directory.
>
> It seems that I could solve both desires with a Step_Frame command.
>
> // Computer 1.
> // Does the storyboard
> // When done, I have a 60 second spot with 1 frame/second
> Initial_Frame = 0
> Final_Frame = 1800
> Step_Frame = 30
>
> // Computer 2
> // When done, I have a 60 second spot with 2 frames/second
> Initial_Frame = 15
> Final_Frame = 1800
> Step_Frame = 30
>
> Since there isn't any such command (that I can find). is there some other
> series
> of commands or tricks that I can use to get the same results?
>
Yes. Sort of! :-)
I'll explain for question 2), but you'll see that it's easy to use a similar
technique for question 1).
Within the scene file you can tell POV-Ray to do whatever you want with the
frame information or the clock information that gets passed in via the
animation options. So if you wish to create such a step frame process you
can declare a variable called 'Step_Frame' and one called 'Frame_Offset'
within your scene file (or INI file), then you can calculated your own frame
number (let's call it MyFrameNumber) and use it wherever you currently use
frame_number:
#declare MyFrameNumber = frame_number*Step_Frame+Frame_Offset;
If you'd rather change these values through the command-line or in the ini
file than set them in the scene file, you can do that too. The syntax is a
little odd, but it allows you to declare a constant that you can read when
parsing your scene file. The syntax is Declare=IDENTIFIER=FLOAT, so in this
case you could specify Declare=Step_Frame=30 and Declare=Frame_Offset=15 in
either the ini file or on the command line.
The remaining problem is with the output file names. I've used a solution in
the past which is a bit messy, so you may find that someone else can propose
a better alternative: You can specify an output file name via the
command-line or ini file that incorporates a unique number for that computer
so that no two computers are using the same output file name. From within
the scene file write a text file that contains a rename command for each
generated image. You end up with one text file for each image, but you can
usually simply run a single OS command to concatenate them into a single
batch file that you can run at the end, to rename all of the images at once.
In Windows the DOS 'copy' command can easily do this concatenation, for
example, 'copy *.txt myfile.bat'.
Note. It takes a little organisation and planning to avoid mishaps ;-). I'd
recommend taking regular backups, so you can always go back a day if you
make some dreadful mistake.
Regards,
Chris B.
Post a reply to this message
|
|