问题描述
我知道这已经被问过,但没有任何答案真的帮助了我。所以我的问题是这样的:我有一堆名为XXXXX000001 ....的.pov文件,我想渲染它们,但POV-Ray内部的队列事物只允许您一次渲染500个。那么,有没有办法自动渲染它们?我知道答案是写一个类似的脚本,但我不知道很多,所以如果你能给我一步一步的指示,我将不胜感激。 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
#更改这些值以渲染帧的子集#
Subset_Start_Frame = 1
Subset_End_Frame = 124
然后,您的 SimpleAnimation.pov 文件将每帧加载一次在.pov文件中,您只需使用POV-Ray变量加载相关的帧文件:
#if(frame_number = 1)
$ p
#includeSimpleAnimation000001.pov
#end
#if(frame_number = 2)
#includeSimpleAnimation000002。 pov
#end
#if(frame_number = 3)
#includeSimpleAnimation000003.pov
#end
渲染的图像将根据 SimpleAnimation.ini 根据 Final_Frame 中的位数,例如你得到了124帧:
$ $ p $ $ $ c $ SimpleAnimation001.png
SimpleAnimation002.png
...
SimpleAnimation124.png
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.
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
这篇关于在POV-Ray(Windows)中渲染多个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!