1

我运行了几个对象的刚体模拟,我想使​​用 povray 渲染这个模拟。

对象的网格保持不变,所改变的只是每个对象的位置和方向。在 povray 中迭代生成电影图像的最佳方法是什么?我可以在每次迭代中编写一个完整的 pov 文件,然后将它们全部发送到 povray,但由于每个网格非常大,我希望只编写一次。可能吗?

如果有更好的方法可以做到这一点,请告诉我......

4

2 回答 2

1

使用 #define 将网格写入 inc 文件并为其命名。在您的主 .pov 文件中,您应该能够定义包含旋转和平移的数组或样条线,然后使用时钟变量对其进行索引并渲染动画。

于 2012-05-17T02:15:51.820 回答
0

这是一种充实 David Buck 建议的方法,使用单个 .pov 文件,呈现为动画。

#include "transforms.inc"
#declare myOriginalObj = /* you do the work here, with mesh aligned to "y axis"*/
#declare newDirection =  /* you do the work here: make new alignment vector,
     as a function of clock  */
#declare newPosition =   /*you do the work here: create vector for new position,
     as a function of clock  */
#declare newObj=object{
    myOriginalObj
    Reorient_Trans(y,newDirection)
    translate newPosition
    }
object{newObj}

进一步阅读: http: //povray.tashcorp.net/tutorials/dd_makesnow/

于 2012-09-27T15:09:45.163 回答