在 Windows 上渲染多个 POV-Ray 场景
我有一大堆来自分子动力学模拟的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于你的问题已经有两个月了,我想你的问题现在应该已经解决了。 但我想为其他对此事感兴趣的 SOers 解释一下。
您可以在参数化循环中多次运行 POV-Ray 脚本。 描述循环参数的典型方法是编写 .ini 文件。
您可以在脚本中使用的两个参数是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 文件来让每个实例渲染所有帧的一部分:
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.
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:
显然它直接支持:
http://news.povray.org/povray.animations/message/%3C47324428%40news.povray.org%3E/#%3C47324428%40news.povray.org%3E
Its directly supported apparently:
http://news.povray.org/povray.animations/message/%3C47324428%40news.povray.org%3E/#%3C47324428%40news.povray.org%3E