命令行渲染

    使用命令行的一个好处就是我们并不需要图形界面进行显示(比如不需要Linux的X server),因此可以通过远程shell进行渲染(典型的比如SSH)。

    • 详见 以查阅完整参数列表(例如指定渲染的场景、结束帧等),或直接运行以下命令:

    • 详见 命令行启动 在Blender通过命令行启动时指定参数。

    Note

    参数会按照给出的顺序依次执行!

    以下命令不会生效,因为输出和拓展参数被设定于Blender已经被指派进行渲染之后:

      以下命令将按预期执行:

      始终-f-a 放在最后一个参数的位置上。

      1. blender -b file.blend -f 10

      -b

      后台渲染(没有用户界面)。

      file.blend

      -f 10

      只渲染第10帧。

      -o /project/renders/frame_#####

      保存渲染图像的路径,使用五个0补位用于帧计数。

      -F OPEN_EXR

      覆盖blend文件中指明的图像保存格式,并保存为一张OpenEXR图像。

      仅渲染倒数第二帧。

      Warning

      参数对大小写敏感! -F-f 是不同的。

      1. blender -b file.blend -a

      -a

      -E CYCLES

      使用“Cycles Render”渲染引擎。执行 blender -E help 查看可用渲染引擎列表。

      -s 10 -e 500

      将起始帧设为 10 结束帧设为 。

      -t 2

      仅使用两个线程。

      In addition to the options above, which apply to all render engines, Cycles has additional options to further control its behavior.

        Note

        Unlike the generic options, the Cycles-specific ones must be passed on the end of the command line, following a double dash.

        --cycles-device CPU

        Override the device that is used to render frames. Currently supported options are CPU, CUDA, OPTIX and OPENCL. Additionally, you can use CUDA+CPU or in order to use both CPU and GPU rendering.

        Show detailed statistics about memory and time usage for Cycles renders on the console.