4

我有一个项目,我想根据一些数据创建一个 3d 动画。给定特定点,我想创建一个动画,包括球体、线条、一些阴影和一个移动的相机。我想我会在命令行中使用 Python 和 Blender 来执行此操作,但似乎 Python 更像是 Blender 的扩展,而不是独立的场景创建者和渲染器。我发现了这个有用的资源:http : //wiki.blender.org/index.php/Doc:Manual/Render/Command_Line_Options 但它似乎需要一个由用户在 Blender GUI 中生成的“file.blend”?这可能吗,还是有另一种更适合我需要的语言/3d 渲染器?我非常灵活,非常愿意应对陡峭的学习曲线。

提前致谢!

4

3 回答 3

2

是的,Blender可能会对此有好处。新的(在撰写本文时)版本是 Blender 2.5x。尽管它们目前处于测试阶段,但它们非常稳定。Blender 2.5x Python API 文档可以在这里找到:Blender 2.5x Python API docs。他们还有一些邮件列表和一个 IRC 频道,这些都是提问等问题的好地方。

于 2011-03-04T04:00:56.517 回答
0

Since you asked this question, blender 2.6 is out now and stable, Yes you can do this and no, you don't need a file created in a GUI.

You might want a blank file that the script can fill up with assets but this isn't essential.

There is even a template accessible from the text editor called "Background Job", which makes a scene with some text and renders it from python, all running from the command line, it also accepts command line arguments so you can pass variables to the python script which is quite handy.

于 2012-08-26T14:44:15.463 回答
0

Blender 的大部分功能都可以通过 Python 访问。.blend 文件是一个 Blender 文档,其中包含您正在处理的 3D 场景/模型的所有数据,还可以包含 Python 脚本。也可以从命令行调用 Blender,并告诉它运行一个单独的 Python 脚本。因此,有很大的权力和灵活性来做你想做的事。

于 2012-02-09T04:58:00.600 回答