Render multiple files in POV-Ray (Windows)

人走茶凉 提交于 2019-12-23 05:19:11

问题


I know this has been asked before, but none of the answers really helped me. So my problem is this: I have a bunch of .pov files named, XXXXX000001...., and I want to render them, but the queue thing inside of POV-Ray only lets you render 500 at a time. So, is there a way to render them all automatically? I know the answer is to write a script of some kind, but I don't know a lot about it so if you could give me a step by step instructions I would be grateful.


回答1:


Create a POV-Ray .ini file SimpleAnimation.ini using notepad, and in that file specify the number of .pov files as Initial_Frame/Final_Frame. This .ini file is the file you Open and Run to render all the frames. You can also use Subset_Start_Frame/Subset_End_Frame with duplicate .ini files when rendering subsets over multiple machines:

Input_File_Name="SimpleAnimation.pov"
Width=800
Height=600
Antialias=On
Antialias_Threshold=0.05
Output_File_Type=N

Initial_Frame=1
Final_Frame=124

# Change these values to render a subset of the frames #
Subset_Start_Frame=1
Subset_End_Frame=124

Your SimpleAnimation.pov file will then be loaded once per frame and in that .pov file you just load the relevant frame file you want using the POV-Ray variable frame_number:

#if(frame_number=1)
#include "SimpleAnimation000001.pov"
#end
#if(frame_number=2)
#include "SimpleAnimation000002.pov"
#end
#if(frame_number=3)
#include "SimpleAnimation000003.pov"
#end

The rendered images will be generated with names according to the Input_File_Name in the SimpleAnimation.ini file with leading zeros according to the number of digits in Final_Frame, e.g. for 124 frames you get:

SimpleAnimation001.png
SimpleAnimation002.png
...
SimpleAnimation124.png



回答2:


An addition to the previous answer, SimpleAnimation.pov file can be just a one line:

#include concat("FolderPath/SimpleAnimation.", str(frame_number, -6, 0), ".pov")



来源:https://stackoverflow.com/questions/24295883/render-multiple-files-in-pov-ray-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!