[Created] Multiblend - distributed rendering

it isn’t easy to use multiple computers on a network to render in parallel. That’s exactly what this program will do. It connects to multiple computers on your network, and lets Blender render in parallel on each. This will drastically improve your rendering speeds!

  Multiblend is a standalone Python script that runs from outside     Blender. This means you can even use it on machines that don't     have powerful graphics cards, like older computers or servers.

Having the ability to distribute rendering across a couple of computers can be really useful, even for the casual home user. Once Multiblend has been set up (6 lines in the config file, of which 4 probably won’t have to be changed, plus 4 lines per computer), it can be called as follows:

python multiblend.py -b somefile.blend -s 1 -e 1200

to render the first 1200 frames of somefile.blend. It will do its best to properly balance the rendering load across all nodes.

For more information please visit http://www.stuvel.eu/multiblend
To download the script, fetch http://www.stuvel.eu/files/multiblend.py

Let me know what you think of it!

Didn’t try it now… possible to render single image on the network ?

Multiblend distributes based on entire frames, so you could render a single image, but it would only be rendered by a single host.

Hi, here is a script I did for distributing the render of single frames:
http://fab.gnux.info/progs/cutilan.zip
I hope you’ll enjoy it. I haven’t take a look to your code but maybe we could do a “all in one” script, but mine require blender to run on the “master” host, slaves won’t need it.

Your code sure is a lot more complex than mine. One of the features of my script is that it is just a single file. The only thing that needs to be run on the slave nodes is a SSH server and a NFS client, and Blender needs to be installed on it. SSH and NFS are installed on the majority of Linux computers by default.

I’ll see if I can decypher your code. It could sure use more documentation in the code itself. It would be nice to have a one-for-all distributed rendering solution, but I can’t promise anything - I’m working on my graduation project at the University of Amsterdam, which is taking quite a lot of my time. I needed the distributed rendering for a presentation I made in Blender :wink:

This looks very cool but I wonder if it would be useful for me. If you have time to comment, please do. I current render an animation on all of my projects. However, the animation isn’t an animation in the typical sense of the word. It merely uses the animation code in blender to render several still images of the same model from many cameras. I have a script that automatically switches the camera to a different camera at each frame. So, then I render 10-17 images by clicking on ANIM. However, I am really just generating 17 still views of the same model. If I use your script to distribute this process to multipl computers, I suspect my script which is linked inside the model will get ignored. True?

The advantage of my code is it includes the networking part, so there is no need for external setup (like ssh or nfs) . By the way, I think you could forget nfs and use scp or similar, it will simplify deployment. In fact, I think my code could easily be modified to render multiple full frames. If I get some time I’ll do some try. Have you tested my script ? worked ? I havn’t got a lot of feedback…
Feel free to ask questions about the code if you need.

My script uses Blender for the rendering, and it will render just like when you hit the “Anim” button. Everything should work out fine!

I haven’t tested your script yet. About not using NFS, it’s a good idea. Blender outputs the filename of the saved frame, and I can use that to copy it back to the master node.

Fab31, i’m trying to put your script working, but it gives me this error:

FAILURE: Coercing to Unicode: need string or buffer, NoneType found.

Can you help me?

Thank you ver much!

Fab31, how does your script deal with external dependencies of the Blender file? What if images etc. are required and not packed within the .blend file?

Everything need to be packed for the script to work.

Please, paste here console’s output (blender and slave) and the declaration of the variables. Thanks.

Hi, fab31 :cool:

I get the pictures from the Blender UV Editor:
Render result, Render result.001, Render result.002…

…but everyone is the same image, no matter what you change in the scene.

If you have problems, run this slightly modified version (same place: http://fab.gnux.info/progs/cutilan.zip). It’s more verbose, paste the whole console output, it may help.

Sorry for taking so long. Here is what i got.

Server: (run from Blender)

Looking for installed Python version 2.4
Got it!
SCANNING…
testing 192.168.0.115:18812 (^C if it’s too long)…
>> 192.168.0.115
Sending job to 192.168.0.115
streaming 997623 bytes
FAILURE: coercing to Unicode: need string or buffer, NoneType found on {‘host’:
‘192.168.0.115’, ‘part’: 0, ‘result’: <AsyncResult (exception) at 0x01799bf0>}
UNMANAGED ERROR
FINISHED 1 parts in 0.00 seconds

Host:
C:\Python24>python “C:\Progs 3D\Blender 2.41\cutilan\run_server.py”
[1632] bcast: started broadcasting query server on (‘0.0.0.0’, 1812)
[1632] listening on (‘0.0.0.0’, 18812)
[1632] bcast: now answering (‘192.168.0.1’, 1158)
[1632] welcome (‘192.168.0.1’, 1159)
[1632] goodbye (‘192.168.0.1’, 1159)
[1632] welcome (‘192.168.0.1’, 1160)
Job request
Start working
Stop working

Please, copy the definition of:
BLENDER
TEMPORARY_DIRECTORY
in cuti.py
and eventually the 4 variables definition in client_script.py header.

Also, re-fetch the .zip, I updated again to be more verbose on this specific part… try to recopy the output again if it looks more precise.

I’m doing something wrong but don’t know what.
Here my definitions.

My server “client_script.py” file header

RENDER_SLAVES = (‘renderfarm.myhost.com’,’*’)
TEMPORARY_BLEND = ‘/tmp/dummy.blend’
OUTPUT_FILE = ‘/tmp/out.png’
INSTALLATION_PATH = ‘c:/_Progs 3D/blenderCVS/cutilan’

My host “cuti.py” file header:

BLENDER = r"c:/Progs 3D/BlenderCVS/blender.exe"
TEMPORARY_DIRECTORY = r"c:/tmp" # change it if you want
Do y need the “r” letter or not? have tried with and without.

Last result:

Server: (run from Blender)

Looking for installed Python version 2.4
Got it!
SCANNING…
testing 192.168.0.115:18812 (^C if it’s too long)…
testing renderfarm.myhost.com:18812 (^C if it’s too long)…
ERR [SERVER] renderfarm.myhost.com:18812
>> 192.168.0.115
Sending job to 192.168.0.115
streaming 996945 bytes
FAILURE: coercing to Unicode: need string or buffer, NoneType found on {‘host’:
‘192.168.0.115’, ‘part’: 0, ‘result’: <AsyncResult (exception) at 0x01798c50>}
UNMANAGED ERROR:
Traceback (most recent call last):
File “client_script.py”, line 126, in ?
bzf, duration = job[‘result’].result
File “C:/_Progs 3D/BlenderCVS/cutilan\Rpyc\AsyncNetProxy.py”, line 65, in _get
_result
raise_exception(*self._result)
File “C:/_Progs 3D/BlenderCVS/cutilan\Rpyc\Lib.py”, line 19, in raise_exceptio
n
raise val
TypeError: coercing to Unicode: need string or buffer, NoneType found
FINISHED 1 parts in 0.00 seconds

Host:
[3608] bcast: now answering (‘192.168.0.1’, 1410)
[1632] welcome (‘192.168.0.1’, 1411)
[1632] goodbye (‘192.168.0.1’, 1411)
[1632] welcome (‘192.168.0.1’, 1412)
Job request
Start working
Stop working
ERROR OCCURED:
None

[EDIT]
I’ve using this version (BF Windows 2006/05/01 + cloth). It’s OK?

fab31- I may have missed something, but there were no scripts in the zip. Where am I supposed to find them? Thanks.

Katt

I don’t see any error here :confused:
The “r” is for disabling escape sequences interpretation (using it allow you to type “” in the string instead of “\”).
I’m not sure but it sounds like a bug in the backend library for network (Rpyc)… Please, re-download the .zip, It’s a bit more verbose again it should expose something if it comes from my code.

I can’t test it since I have no windows installed. when you start blender with -h do you have the -F argument documented ? If you have it, it should be ok.

Could you be more explicit ? don’t you find any file in the .zip ? if so, install a better unzipping program. If you find files, then simply read the readme :smiley:

Oh, sorry! :o
My computer was not unzipping the code and not telling me. Windows is concerned for safety.:mad:

Katt

I’m getting the same error. What’s wrong?

Sybren, I’ll check your script out also. I really need a script for single frame renders.