I have animations in 4 different scenes in my Blender file that I would like to batch render.
Is there a way to batch render all the scenes, instead of only the scene I am working in?
I have animations in 4 different scenes in my Blender file that I would like to batch render.
Is there a way to batch render all the scenes, instead of only the scene I am working in?
Yes, you can use
blender -b file_name.blend -x 1 -o //file -F AVI_JPEG -s 001 -e 250 -S scene_name -a
-b
: tells blender to run in background
-x
: is used to add an extension to the movie
-o
: sets the directory + Target image file
-F
: sets the output image type
-s
: 001 -e 250 -a set the start frame to 001 and end frame to 250. Important: You can use -s or -e, but if they're not in order, they'll not work!
-S
: sets the scene name to render (spaces in the name are not supported)
-a
: renders the animation
The above command should render whatever scene name you specify to -S
. To avoid certain problems where similar files can get overwritten, its best to use a script to render each scene on a different line. For example:
batch_render.sh / .bat
blender -b file_name.blend -x 1 -S scene_name001 -o //file -F AVI_JPEG -s 1 -e 250 -a
blender -b file_name.blend -x 1 -S scene_name002 -o //file -F AVI_JPEG -s 1 -e 250 -a
You could also do this in one command - as follows:
blender -b file_name.blend -x 1 \
-S scene_name001 -o //file -F AVI_JPEG -s 1 -e 250 -a \
-S scene_name002 -o //file -F AVI_JPEG -s 1 -e 250 -a
However launching blender isn't typically a bottleneck, so it may end up being less trouble to run a new blender instance for each scene.
To get a better understanding of the parameters, you can see the wiki.
blender file_name.blend -b -S Scene1 -s 1 -e 250 -a -S Scene2 -s 10 -e 50 -a -S Scene3 -s 5 -e 10 -a
Just remember arguments are executed in order given, so change scene, set frame then render.
$\endgroup$
Commented
May 25, 2013 at 1:27
-s
was the part I forgot when I tested it, the second scene would overwrite the first, please edit as necessary. Thanks.
$\endgroup$
-F
— TGA, RAWTGA, JPEG, IRIS, IRIZ, AVIRAW, AVIJPEG, PNG, BMP — docs.blender.org/manual/en/dev/advanced/command_line/…
$\endgroup$
Commented
May 31, 2019 at 0:24
As iKlsR wrote, you can use command-line options to render scenes in batch. If you have saved all the necessary settings such as the start and end frames, the output format, and the output file names in your blend file and all you want is just render the animations in specific scenes, then you do not have to specify many command-line options and you can do it with just
blender -b file.blend -S Scene1 -a -S Scene2 -a
This means:
-b
: Run Blender in the batch mode (do not open a window).file.blend
: Open a file called file.blend.-S Scene1
: Switch to Scene1.-a
: Execute the Render > Render Animation command.-S Scene2
: Switch to Scene2.-a
: Execute the Render > Render Animation command.Make sure you set the output directories and the file names of each scene correctly in the blend file so that the render result from one scene will not be overwritten by the render result from another scene.
Note that a file name just means “open this file.” You can also render scenes in different files in one batch by using a command line like:
blender -b A.blend -S A1 -a -S A2 -a B.blend -S B1 -a -S B2 -a
This renders the animations in four scenes in total: scenes A1 and A2 in file A.blend and scenes B1 and B2 in file B.blend.
blender -b one.blend -a two.blend -a
Run blender -h
(or man blender
) to list of options with descriptions.
The answers above worked for me (on Windows 10) but only after I did some research. For those like me who have no idea how to take what is written above and make it work for your project, here is what I did:
cd "C:\Program Files\Blender Foundation\Blender"
blender -b "E:\Project Folder\03_projects\Blend Files\Render Me.blend" -S Scene_1 -a -S Scene_2 -a
blender.exe
file is in. It won't just 'know' where to look. cd
is the change directory command that I used." "
to contain the folder structure (I assume because the folder names have spaces in them)..blend
file you want to render. You'll need to use " "
for this too, and you'll want to include the .blend
file within the quotations.I hope this helps someone. There's bound to be others who don't know anything about command line, lol.
Happy Googling