tags:

views:

412

answers:

2

I have a whole bunch of POV-ray files from a molecular dynamics simulation with the general name "frameXX.pov" where "XX" is the number of the frame. I want to render them all but I have like 500 so I really don't wanna do it by hand. I'm sure there is a way to do this from the command line or a batch file...what would be the best way to do it? Thanks for the help :)

+1  A: 

Its directly supported apparently:

http://news.povray.org/povray.animations/message/%3C47324428%40news.povray.org%3E/#%3C47324428%40news.povray.org%3E

Pyrolistical
thanks for the help :)
Casey
+2  A: 

Since your question is 2 months old, I presume your problem will be solved by now. But I want to explain for other SOers interested in the matter.

You can run a POV-Ray script a number of times in a parameterized loop. A typical way to describe the loop parameters is by writing a .ini-file.

Input_File_Name=somegreatscene.pov

; these are the default values
Initial_Clock=0.000
Final_CLock=1.000

; usually you'll start with Frame 0...
Initial_Frame=50
Final_Frame=100

Height=640
Width=480

The two parameters you can use in your script are clock_ and frame_number. clock_ is a float value by default varying from 0 for the first frame to 1 for the last. The clock_ step is determined by the number of frames to be rendered, in the above example the first frame will be rendered with a clock_ value of 0, the next with 0.02, then 0.04 and so on. Alternatively you can use frame_number, which is an integer counter, in this case 50 for the first frame to 100 for the last one.

By default POV-Ray 3.7 will use all available CPU cores for rendering, but version 3.6 runs on a single core only. However you can run more than one instance of POV-Ray simultaneously, and let each instance render part of all the frames by adding these lines to the .ini-file:

; render the first half of frames 50 to 100
Subset_Start_Frame=50
Subset_End_Frame=75
stevenvh