Always use relative path

Blender 2.63a

When working cross platform,it’s important to have all blend files use relative path. That every other files linked into the blend can be found in the path relate to it, with no OS specific mount point.
By doing

File->External Data->Make all path relative

And see the result message at the top of the screen if something went wrong. This way you can be sure that your blend will be opened in other OS fine, provide that you don’t change the folder structures.

This can be useful for archiving the project after you finish it, by storing the whole folder structures as is, you can move your project anywhere without losing links or external textures.

Copy camera aperture settings from main camera to stereo

Blender 2.63a
Stereoscopic Add-on 1.6.7 

Stereoscopic camera add-on from helps generate stereo camera for 3D rendering.

It does the job well, except when working with DoF in Cycles. The add-on doesn’t copy the aperture setting from main camera the the stereo ones.

So I wrote a  script to automate this.

After setting up stereo cameras, create an empty text and paste this script.

import bpy

thisCam =["L_Camera"] =["Camera"].data.cycles.aperture_blades =["Camera"].data.cycles.aperture_size =["Camera"].data.cycles.aperture_rotation =["Camera"].data.cycles.aperture_type

thisCam =["R_Camera"] =["Camera"].data.cycles.aperture_blades =["Camera"].data.cycles.aperture_size =["Camera"].data.cycles.aperture_rotation =["Camera"].data.cycles.aperture_type

and run script.

Use spreadsheet to generate batch render command

Blender 2.63a
Libre Office 3.4.4

Being able to render from command line is convenient, to queue up many files for rendering, you could create a batch file (like renderall.bat) contain these command.

blender -b scene1blah.blend -a
blender -b scene2blahblah.blend -a
blender -b scene3blah.blend -a

so on…

And run the renderall.bat from command line.

Problem is the amount of typing/copy&pasting those commands if you have like a few hundred shots to render could be overwhelming.

Spreadsheet like LibreOffice Calc is coming to rescue.

Assume you’re in Windows. In cmd, cd to the drive/folder where you keep those blend files. Then

dir /B /O N *.blend >allblend.txt

This will list every files ended with .blend and write into a new text file called allblend.txt, sorted by name.

Run Calc. Click menu Insert->Sheet from file

Browse to the allblend.txt, you just created. OK with default settings, you’ll end up with each blend file in its row in column A.

Click and drag to hilight every cells in A and move them to B

In an empty cell A1, type in ‘blender -b’. And duplicate this to every A row by dragging the lower right corner of the A1 cell down to the last row.

Also, in cell C1, type ‘-a’ and duplicate it down to every C row.

Your spreadsheet should look like this

You can remove rows that you don’t want to render.

Now save as … Text CVS (.cvs)

There would be a dialogue pop up to ask for ‘Field Delimiter‘, change this one to {space}

You’ll have a .cvs file, which is actually a normal text file that you can change the extention to .bat and execute it as a rendering queue.

Use Python script to generate render filepath

Blender 2.63a

When dealing with hundreds of shots, it could be painful to change the render filepath manually. So I wrote a script to automate this task based on .blend file name.

For example, I organise my files to be named like – S05C04_20120727.blend
Where S = scene, C = cut, and those 8 digits are the date this file has been changed.

I like my render filename to be the same with blend file but strip the date part out.

So, in Text Editor, paste this script

import bpy

currentfilename = bpy.path.display_name_from_filepath(

#this will store the current file name (with ".blend" truncated)
#into a variable called "currentfilename"
#so now, currentfilename hold a string 'S05C04_20120727'

renderfilepath = '//../render/'+currentfilename[:-9]+'/'+currentfilename[:-8]

#the [:-9] means truncate last 9 charactors out of the string
#so currentfilename[:9] would be 'S05C04'
#and currentfilename[:-8] would be 'S05C04_'
#renderpath variable would be '//../render/S05C04/S05C04_'['Scene'].render.filepath = renderfilepath
#don't forget to change 'Scene' to your actual scene name

Now press ‘Run Script’, you’ll see the render filepath change.

You can run this script with other blend file as well. For running from command line without opening the GUI, You have to add another line at the end

#to save changes that you've made.

and save it as a .py, like –

Now, from command line, run

blender -b S03C12_20120727.blend -P

This will change the setting inside the S03C12_20120727.blend file without the need to run Blender GUI.

If you can’t see it, it’s not exist.

not Blender specific

I’ve come across many newbie’s project with quite heavy scene.
They would cry how slow their project would render.

One common mistake is that they place objects everywhere, like real world objects, even where the camera never sees.

So, if the object or its reflection, or shadow is not subjective in the camera’s field of view, it rather not exist at all – delete it! And make the set as small as possible.

Auto-Key is a mess!

Blender 2.63a

Some of you might love Auto-Key, but I find it often leaves keys where it’s not needed.
I accidentally animate a static prop while just trying to move things around.

My crews love this feature and it’s nightmare to fix the animation later because of huge amount of keysframes left uncleaned.

Keyframe should be what traditional animator says : KEY frame

My advice – never turn Auto-Key on.

Press i to insert keyframe only where you want, wouldn’t take too much time of your life, I can assure you.

If you need to key every bone at once, there’s a ‘Whole Charactor’ option available after pressing i.

Render from command line

Blender 2.63a

You can render a scene without opening the blender interface from command line

in windows – cmd
in linux or mac – terminal

Provided everything is set and ready to be rendered, to render animation type in command

blender -b filename.blend -a

For more advance options, you can use python script to change some settings in the blend file before render.

Create an empty text file with your favorite text editor (or in blender). Copy & paste these example settings.

import bpy

#change scene name to yours
Scenename = 'Scene'

# quality[Scenename].render.resolution_x = 2048[Scenename].render.resolution_y = 1080[Scenename].render.resolution_percentage = 50[Scenename].render.use_antialiasing = True[Scenename].render.use_full_sample = True

# frame range[Scenename].frame_start = 1[Scenename].frame_end = 5

# image format[Scenename].render.image_settings.file_format = 'TIFF'[Scenename].render.image_settings.quality = 80[Scenename].render.image_settings.color_mode = 'RGBA'

# Cycles sampling[Scenename].cycles.samples = 200

# stamp[Scenename].render.use_stamp = 1[Scenename].render.stamp_background = (0,0,0,1)

# output[Scenename].render.filepath = '//render/test_'[Scenename].render.use_placeholder = True[Scenename].render.use_overwrite = False

# start render animation

The important lines are the first and the last. Other lines can be changed to fit your need. The properties names are quite self-explained. The # sign is for comment line, will be ignored by the interpreter. You can hover the mouse over any boxes or buttons in Blender to see the script associated.

More details can be found at blender python api reference :


Save the text as ‘’. You might put it in the same folder as the blend file for convenient.

To start render from command line, type

blender -b filename.blend -P


Speed up viewport display for NVIDIA card

Blender 2.63a

Viewport performance on computer with NVIDIA card is quite slow. One way to increase speed is disable the double sided shading.

For every object, uncheck the box :

Really huge improvement.

A little bit cumbersome if you have lots of objects to do at once.

So, keep in mind to uncheck it immediately every time you create a new object.


I’ve found a script to do this for every objects in the scene. Just switch to text editor and paste in these codes:

import bpy
for ob in
if ob.type == 'MESH' : = 0

and press runscript. (there should be a tab indent on 3rd line, and 2 tabs on 4th line – or you’ll get error when running the script)

Use ‘Scene’ to manage set

Blender 2.63a

When you have a set with lots of static objects, your outliner could be filled with those unidentified objects and sometimes gets in the way of selecting the right one.

You might join them to become one object, but it’ll be harder to move things around or assign new material later.

Better approach would be to create a new empty scene, place all those non-animate objects in this scene and group them. Rename the group to a meaningful name.

in the main scene, just add a ‘Group Instance’ with the group you just created.

Now, there’s only one object in the main scene, and you can still edit those individual objects by going to the ‘Set’ scene.

Stamp is useful

Blender 2.63a

Stamp prints useful information onto the rendered image. I find it’s convenient to have it turn on all the time, so that I woudn’t have to wonder which version of the file this image was rendered from. In fact, I enlarge my output file size a little to accomodate those small text at the top and bottom in the final render as well.