blenderdist
August 21st, 2005 by Samuel TardieuWhen doing some heavy 3D rendering with Blender, I realized that one of my animation was going to take 53 hours to render. Existing distributed rendering systems such as DrQueue were fine but require that some software other than Blender or basic interpreters (such as Python or Perl) is installed on the contributing machines.
So I wrote a simple Python script called blenderdist.py which only needs blender and python to run. A server is launched with:
% python blenderdist.py --server PORT JOBDIR RENDERDIR
and will monitor the status of job files (three lines each, the blender file, the first frame to render and the last one to render) in JOBDIR. Resulting frames are placed under RENDERDIR/jobname. Job names have to end with .job and if a file named JOBNAME.job.suspend is present, its rendering is suspended to allow urgent jobs to be rendered first.
Clients are launched with:
% python blenderdist.py --client HOST PORT
The server constantly monitors its source code. Whenever the Python script changes, the server relaunches itself (without loosing its state saved in a checkpoint file) and the next time the clients connect to it they will receive the new version of the program and relaunch themselves too.
I have currently a dozen machines working as I type, most of them out of my control. Some friends of mine have agreed to run the script and are contributing CPU cycles for my rendering. This proves to be very helpful. The program is much less powerful than generic ones such as DrQueue, but it does not require that disk space is shared between machines or setting up complex scripts. It just gets the job done.
Note: as this script has been written for a one-time shot need, I place it under the public domain, do whatever you want with it.
Related posts:

August 31st, 2005 at 0:54
Update: the script, still at the same location, now includes prefetching capabilities and multiprocessor supports, thanks to Christophe Wolfhugel for his requests as the prefetching benefits even to monoprocessor machines as the server is monothreaded.
February 6th, 2006 at 6:05
We’re using blenderdist for our rendering project. Because we need all the CPU’s we can get, we’ve ported the script so that it works in Windows as well as Unix variants. We will post details at our blog.
March 28th, 2006 at 20:47
This is fantastic. I’m using it with great success. Thanks!
May 4th, 2007 at 18:48
I stumbled accross this script while searching for a ways to render projects using Blender.
I am an Artist who knows “some” technology. I would like to try this script but I am having trouble getting it working. I would be running it on linux and windows machines.
How should the acutal command(s) look for running this script?
Here is the syntax for launching both the server and client blenderdist:
python blenderdist.py –server PORT JOBDIR RENDERDIR
python blenderdist.py –client HOST PORT
I’m not sure what to enter for the “–server”, “–client “, “PORT” “JOBDIR”, “RENDERDIR” or “HOST”parts of the script.
Is an example of a working command(s) available? Can someone post what
a “real/working” set of these commands look like. This should also be added
to the script.
If I could see what two “actual/working” server and client “launch”
commands look like I can figure out how to make this work. I
would love to test it out on my 4 node linux render farm.
Thanks