Command Line Rendering¶
In some situations we want to increase the render speed, access Blender remotely to render something or build scripts that use the command line.
One advantage of using the command line is that we do not need a graphical display (no need for X server on Linux for example) and consequently we can render via a remote shell (typically SSH).
See Command Line Arguments for a full list of arguments (for example to specify which scene to render, the end frame number, etc.), or simply run:
See Command Line Launching for specific instructions on launching Blender from the command line.
blender --help
Note
Arguments are executed in the order they are given!
The following command will not work, since the output and extension are set after Blender is told to render:
blender -b file.blend -a -x 1 -o //render
The following command will behave as expected:
blender -b file.blend -x 1 -o //render -a
Always position -f or -a as the last arguments.
Single Image¶
blender -b file.blend -f 10
-bRender in the background (without UI).
file.blendPath to the blend-file to render.
-f 10Render only the 10th frame.
blender -b file.blend -o /project/renders/frame_##### -F OPEN_EXR -f -2
-o /project/renders/frame_#####Path of where to save the rendered image, using five padded zeros for the frame number.
-F OPEN_EXROverride the image format specified in the blend-file and save to an OpenEXR image.
-f -2Render only the second last frame.
Warning
Arguments are case sensitive! -F and -f are not the same.
Animation¶
blender -b file.blend -a
-aRender the whole animation using all the settings saved in the blend-file.
blender -b file.blend -E CYCLES -s 10 -e 500 -t 2 -a
-E CYCLESUse the “Cycles Render” engine. For a list of available render engines, run
blender -E help.-s 10 -e 500Set the start frame to
10and the end frame to500.-t 2Use only two threads.
Cycles¶
In addition to the options above, which apply to all render engines, Cycles has additional options to further control its behavior.
blender -b file.blend -f 20 -- --cycles-device CPU
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 CPUOverride the device that is used to render frames. Currently supported options are
CPU,CUDA,OPTIXandOPENCL. Additionally, you can useCUDA+CPUorOPENCL+CPUin order to use both CPU and GPU rendering.--cycles-print-statsShow detailed statistics about memory and time usage for Cycles renders on the console.