在 Windows 上渲染多个 POV-Ray 场景

发布于 2024-07-09 15:57:51 字数 150 浏览 5 评论 0原文

我有一大堆来自分子动力学模拟的 POV-RAY 文件,通用名称为“frameXX.pov”,其中“XX”是帧的编号。 我想渲染它们全部,但我有大约 500 个,所以我真的不想手工完成。 我确信有一种方法可以从命令行或批处理文件执行此操作...最好的方法是什么? 谢谢您的帮助 :)

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 :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

云柯 2024-07-16 15:57:51

由于你的问题已经有两个月了,我想你的问题现在应该已经解决了。 但我想为其他对此事感兴趣的 SOers 解释一下。

您可以在参数化循环中多次运行 POV-Ray 脚本。 描述循环参数的典型方法是编写 .ini 文件。

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

您可以在脚本中使用的两个参数是clock_frame_number。 默认情况下,clock_ 是一个浮点值,从第一帧的 0 到最后一帧的 1。 Clock_ 步骤由要渲染的帧数决定,在上面的示例中,第一帧将使用 Clock_ 值 0 进行渲染,下一帧使用 0.02,然后是 0.04,依此类推。 或者,您可以使用frame_number,它是一个整数计数器,在本例中,第一帧为 50,最后一帧为 100。

默认情况下,POV-Ray 3.7 将使用所有可用的 CPU 内核进行渲染,但 3.6 版本仅在单个内核上运行。 但是,您可以同时运行多个 POV-Ray 实例,并通过将以下几行添加到 .ini 文件来让每个实例渲染所有帧的一部分:

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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文