Command Line Arguments

Blender can also be run from the command line. In the following I will assume the you are in Blender's directory or that the Blender executable is in your PATH. This second option is the preferred one. Please refer to your friendly OS manual to learn what a PATH is, and how to have Blender in it.

Plain blender runs the whole thing just as if you clicked the Blender icon.

Adding command line arguments can force different behaviours. The general syntax is:


	
	blender [options] [file]
	
	

The basic option to remember is -h, that is the help option... once you remember this Blender will tell you all the others... a sort of magic word.


	
	blender -h
	
	

Yields:


	
Blender V 2.28
Usage: blender [options ...] [file]

Render options:
  -b <file>     Render <file> in background
    -S <name>   Set scene <name>
    -f <frame>  Render frame <frame> and save it
    -s <frame>  Set start to frame <frame> (use with -a)
    -e <frame>  Set end to frame (use with -a)<frame>
    -a          Render animation

Animation options:
  -a <file(s)>  Playback <file(s)>
    -p <sx> <sy>        Open with lower left corner at <sx>, <sy>
    -m          Read from disk (Don't buffer)

Window options:
  -w            Force opening with borders
  -W            Force opening without borders
  -p <sx> <sy> <w> <h>  Open with lower left corner at <sx>, <sy>
                        and width and height <w>, <h>

Game Engine specific options:
  -g fixedtime          Run on 50 hertz without dropping frames
  -g vertexarrays       Use Vertex Arrays for rendering (usually faster)
  -g noaudio            No audio in Game Engine
  -g nomipmap           No Texture Mipmapping
  -g linearmipmap       Linear Texture Mipmapping instead of Nearest (default)

Misc options:
  -d            Turn debugging on
  -noaudio      Disable audio on systems that support audio
  -h            Print this help text
  -y            Disable OnLoad scene scripts, use -Y to find out why its -y
  -R            Register .blend extension
	
	

Let's analyze these.

Render Options

The most important set of options. They allow you to do background rendering. This implies that you render an image without having to run the Blender GUI. This uses some less memory and, usually, much less CPU time.

It is important to note that there are very few parameters which can be passed via the command line. Image dimensions, file types etc. need to have been set interactively before via the GUI.

To render a still image (assuming the still is in frame number 1):


		
		blender -b yourfile.blend -f 1
		
		

To render an animation going from frame 1 to frame 100:


		
		blender -b yourfile.blend -s 1 -e 100 -a