Blender 2.5 Network Render

Note: The following information is based on Blender 2.5 Alpha 2 (R2.52.0 27226) running over Windows XP.

Important: Do not render to the network directly from your working file. Once you have everything set to render the way you like, save the working file and then save it with a different name (like myfilename-NR.blend). You can then send this file from the client.

So some knuckle heads like me that like to Blend things are not network geniuses and need a little help to understand how networked things are supposed to go together. If you are in that boat, this tutorial may help you get a render farm up and running with minimum hassle.

When you first looked at Blender 2.5, if you are like me, you were stoked to see that the wonderful folks at the Institute have included an option for network rendering. That is until you tried it. Then there was just major confusion and disgust because all wiki stuff assumes that you understand the topology of the render network and know the difference between client, master and slave nodes and how they all work together. Which machine is the master? Which is the slave? What on earth is the client for? You've got questions, I've got answers.

What Do the Various Nodes Do?
To begin with, the system requires all three types of nodes (client, master and slave) at the same time to operate as intended. The order in which you start them is important, and several other settings are required to make life easier. Here is a brief description of each node and what it does:

The Master Node does no rendering, it just stores the .blend information and sources out the rendering to slaves and keeps track of what 'Chunks' are going where.

The Slave Node (or nodes) are the work horses, doing all the rendering under the control of the master.

The Client Node is the node from which render jobs are sent to the master for distributed rendering by the slaves. This is where you have your project open and are working in Blender.

As an example, let's run all the nodes together on one machine so you understand that the various node types are not machine dependent. I grant you that this is silly because you will be using the same resources for all three nodes, but it is a learning excercise.

Setting Up the Master
Start an instance of Blender and open the default drawing. In the rendering engine dropdown (to the right of the scene dropdown) select 'Network Render'. If you have the render button selected in the button window, you should see the Network Settings panel that looks like this:


The first instance of blender that we start needs to be the Master node. Click the button that says 'Master' (it will turn blue). Now the panel will look like this:


Simply press the 'Start Service' button, the render window will open and the master will begin broadcasting a signal over the network identifying itself to any clients or slaves.

Setting Up a Slave
Now start another instance of Blender and repeat the process, only this time, select 'Slave' as the node type. The Network Settings panel will look like this:


Click the 'Refresh' button (with the circular arrows on it) and the slave will go looking for the address of the master node on the network. Once it finds it, it will display the IP address like so:


In this case the address is the same as the address of our master since we are running it on the same machine. Click 'Start Service' and the render window will open, signifying that the slave has started. A slave node can reside on the same machine as the master, and you can open slave nodes on as many machines as you have available to do the work of rendering.

Setting Up a Client
Now open a third instance of Blender. This is the instance where you will want to open your project to be rendered. Once you open the project, while the render engine is still set to 'Blender Render', specify your render settings such as size, default location and file type, and frame range for the render. Once you have all these settings tweaked as you would like (perhaps doing a test render or two locally before sending the job to the network) SAVE THE CHANGES because the last saved version is the one that will be rendered (see 'Where Are My Images?' and 'Where Are My Textures?' below). It is recommended that you do a save as to make a copy for network rendering. Change the render engine to 'Network Render' and the default node type of 'Client' should be selected. The panel looks like this:


Here again, press the 'Refresh' button to find the master node on the network. The panel will then look like this:


Admittedly this is a little intimidating. But let's do a simple network render to alleviate your fears. Click the 'Send Job' button. This grabs the .blend file and sends it to the master node and prepares it for rendering on the slaves. The 'Job Settings' portion of the panel will look like this:


Rendering
Now you are ready to do your first network render. Click the 'Get Image' button. Your client node will send instructions to the master node to render the current frame from the saved version of the .blend file. The master node will determine which slave nodes are available to do the rendering and send information to them to render the frame. The slave nodes will render the frame. Once the image is rendered, it will show up in the render window of your client. You have just rendered over a network!

Stopping the Render
To stop the render from the client, click the 'Stop Render' button or press escape. Click 'Open Master Monitor' and in the Netrender interface (that opens in your web browser) click 'Clear Job List' and confirm to delete the job files on the master. You must reopen your file and reset the client to start rendering properly again. If you save the file with the client network render settings enabled you will not be able to do normal network renders with it again, so do not save the file, especially a working file, after you have enabled the client settings.

Great! Now What?
Rendering a single image over the network is nifty, but of course what you want to do is render big, beefy animations, right? So what happens when we send a lot of stuff to the network to render? How do we know what's going on with our job?

Did you notice the 'Chunks' selector in the Network Settings panel? By using this we can specify how many chunks (or frames) will be rendered before we can retrieve them from the master. By default this is set to five. If you just can't wait for five frames to render before you can look at them, you can lower this number. On projects with a lot of frames, the master will send them to the slaves in chunks of the size you specify. A lower number could mean that machines with faster processing times will get more of the share of the work.

Okay, so you sent your 250 frame animation to the master and started the network animation. How do we keep track of what's going on with the network?

If I want information about the slaves that are running on my network, I can click the refresh button in the Slaves Status section of the panel. Here are my two slaves on the network I set up:


You can enter a name in the Job Settings panel for each job you send, so it is easier to identify which jobs are rendering. By clicking the refresh button on the Jobs section of the panel, I can see what jobs are in the queue and limited information on the status, like the length in frames, number of frames completed and and frames with known errors. Here I have sent a single frame job named 'FLY' the network:


If I want more specific information on all the jobs in the queue plus the ability to change things such as priority and and other network control settings, I can click the button entitled 'Open Master Monitor' and get a web-based interface utility that will allow me to administer the complete queue.

Where Are My Images?
Now that the network has rendered my animation, how do I get it to where I can use it? All of the images are stored on the network nodes apart from the client, so we need to get them back on the client where we can put them into a sequence editor. By clicking the button highlighted in red below on the Jobs section you will import all of the completed images into the directory you specified as the Output directory in the Blender Render panel.


Where Are My Textures?
So I rendered my job and all my textures are gone, man! What happened? Remember when we clicked the 'Send Job' button and sent our .blend file over to the master? One important step we need to take is the make the resource paths relative or pack the resources into our blend file so the master node can find them locally. Do this using the file menu as show below and then SAVE YOUR FILE before sending it to the master node.


Expanding and Summary
Of course what you have just done on a single machine can be expanded over an entire network with multiple slaves and clients. You are limited only by the amount of computers you can scrounge up. I hope you found this brief tutorial helpful and if you find any inaccurate information or think something else should be included, please indicate it in the comments below. Happy Blending!

30 comments:

  1. This is a very useful tutorial, could i make a video tutorial of this and uplaod it to you tube using what you have typed here, my youtube channel name is "bogieman987" (with out the ")

    ReplyDelete
  2. Please feel free. I would request that you place a link to this page for those of us who have limited access to high-speed internet. It's very frustrating to go looking for tutorials and find only video tutorials that use too much bandwidth.

    ReplyDelete
  3. I like more Loki Render ... But is usefull to have this feature on Blender 3D.

    ReplyDelete
  4. this sounds simple enough.. thanks for posting, but in my experience the network render is broken.

    I'm able to get it working on a local machine only. Once the render is complete .exr files in the tmp folder are correct (within slave folder) but if I "get animation" the files appear as .png but only black.

    When using this on a network I'm not able to get anything.

    Sorry just venting! Everything appears to see each other (Master,slaves,client.. etc. and in correct order) but DOESN'T work!!!

    ReplyDelete
  5. Sorry to hear it is not working for you Burn. It took me a lot of experimenting to get it to work. One thing I wonder is whether you read the Important note at the top of this post about not rendering directly from your working blend file. You can do that exactly once, and after that it will not work again. This is why I advised that you make a copy of your file to send to the network for Rendering.
    I tried the exact steps above four or five times while writing the post because I didn't want to confuse anyone.

    ReplyDelete
  6. i'm looking to experiment with this network render stuff as i have 3-4 systems available in the evenings at work.

    usually i'll do my own distributed render by copying the packed blend to each machine and just rendering a different set of frames on each, but this seems like it might be a touch more elegant.

    i'm assuming the client and master instances are not processor heavy, so it would be ideal to have a slave running on the same system? your demonstration seems to suggest that this scenario is feasible, but is there a preferred method for running 2 instances on the same computer? i'm on OSX and i've found if i drill down in Finder I can run the unix executable to spawn multiple instances, but i wanted to verify if this is the best approach.

    thanks!

    ReplyDelete
  7. Thanks you very much, works nice ;)

    ReplyDelete
  8. Schteeve - I should have mentioned that I am running 2.5 over Windows XP. I am not sure what the best approach on the Apple OS would be.

    Caronte - thanks for letting me know the tutorial helped. I hope it works well for others as well.

    ReplyDelete
  9. Well I can't tell if its working or not. Farmer Joe was such a great piece of software to use, so easy to install, pretty bullet proof and so simple. Why does this need to be so complicated! I hope Mitch Hughes is listening and updates Farmer Joe for 2.5

    ReplyDelete
  10. comeinandburn, did you sort out why you are getting just black images? I am getting it too. I created a new blend, saved it and sent the job, it rendered and its all black!..hmmmmm~$%&$@#

    ReplyDelete
  11. I never would have considered Farmer Joe to be easy to install!

    ReplyDelete
  12. Not easy! you don't even need to install blender on the slaves! Just map to the FarmerJoe drive (and install python and neccessary dlls). Anyway thanks for your page, I got it working. I hope there's going to be some more work on this. It seems to be aimed and large team work. Still not quite clear on what its doing. It seems to have to render it twice. Once when you send the job and once when you get it back :/

    ReplyDelete
  13. Thank you so much for this post. I have "second render is black problem" with my animation.
    think I can solve it with info here.
    You have a new dedicated reader.

    ReplyDelete
  14. I also posted my issue with black frames being render and AferVentus gave this solution

    http://blenderartists.org/forum/showthread.php?t=197422#post1802231

    I haven't tried it yet but sounds promising.

    ho hum can't wait until there's an easier solution to all this setup.

    ReplyDelete
  15. Great Tutorial, can't wait to try it when I get home from work tomorrow. Three questions:

    1) Can this be used cross plat-formed? (Linux on one machine and Windows on another)

    2) Can this be run through a command prompt? (Specifically in Linux)

    3) Can this run over a wireless or wired network?

    Thanks!

    Jeremy

    ReplyDelete
  16. Can't imagine why not, assuming that the Blend data is the same for both platforms. It simply uses IP addresses on the network, so it should work. Wired/wireless makes no difference. Let us know...

    ReplyDelete
  17. @Scott Forbes

    I tried your process out tonight and everything worked perfectly! I was able to set up the network with no hassles, and ran a Linux machine and a laptop with Vista.

    I did not try the wireless method, but like you said, with the IPs I don't think it'd be a problem. For the setup, I made the Linux machine run as the Master, Slave, and Client, and the Vista laptop as the Slave.

    The animation is a quick and dirty 60 frame tutorial I had been working on. I just added a translation keyframe and some rotation for the wheels. A little bit of ambient occlusion to see how long it'd take to render. All in all it went pretty fast.

    Once the upload is done on vimeo, it should be available here:

    http://www.vimeo.com/22472593

    Thanks for the great tutorial!

    Jeremy Deighan

    ReplyDelete
  18. Do you know of any information on doing this with a terminal or command prompt? I'd like to get rid of all the GUIs if possible.

    ReplyDelete
  19. Hi

    I find that more than interressant but in my blender i have no : Network setting options

    Is it a plug-in (add-on?)

    I m under Blender 2.5 alpha 2

    thx

    ReplyDelete
  20. I don't. I have actually quit using Blender because it became too much of a distraction from more important things in my life. There may well be, but I don't know it.

    ReplyDelete
  21. Nice Post !!!

    www.virtualreality-3d.blogspot.com

    ReplyDelete
  22. Hi, i know you just told that ur not using blender anymore but, i´m studying the network render and trying to find its limitations. Now i´m stuck... I am trying to use the network render with the composite nodes, and im having all kinds of trouble. I posted a topic in CGTalks forum, if you or anybody have tried it and has some usefull information or want to discus it give me a reply.

    http://forums.cgsociety.org/showthread.php?p=6979681#post6979681

    Thx

    ReplyDelete
  23. In my Blender, the network render option have disappear, do you know what's happen?

    ReplyDelete
  24. I got this error :
    I have a Linux and a Windows OS
    [08/Jul/2011 16:14:34] "GET /version HTTP/1.1" 200 -
    [08/Jul/2011 16:14:36] "GET /version HTTP/1.1" 200 -
    [08/Jul/2011 16:14:36] "GET /status HTTP/1.1" 200 -
    TypeError: calling class function: Function.result expected a string enum or a s
    et of strings in ('RUNNING_MODAL', 'CANCELLED', 'FINISHED', 'PASS_THROUGH'), not
    NoneType

    location::-1

    location::-1
    [08/Jul/2011 16:14:41] "GET /version HTTP/1.1" 200 -
    [08/Jul/2011 16:14:41] "GET /status HTTP/1.1" 200 -
    TypeError: calling class function: Function.result expected a string enum or a s
    et of strings in ('RUNNING_MODAL', 'CANCELLED', 'FINISHED', 'PASS_THROUGH'), not
    NoneType

    location::-1

    location::-1

    ReplyDelete
  25. Please note that I no longer have Blender installed on my machine. I'm afraid I cannot answer the above questions.

    ReplyDelete
  26. Congratulations! This is the great things. Thanks to giving the time to share such a nice information.
    Rebus Media

    ReplyDelete
  27. Thanks for your Blender network render tutorial! I was struggling for a while on my own and your post filled in the gaps nicely. :D

    ReplyDelete
  28. GREAT ADVICE!!!!! Every YouTube tutorial for network rendering was confusing. I even settled to watch a guy explain it in Russian (which I cannot speak). I followed his cursor like crazy and he was still more informative than the English tutorials. This explanation trumps them all though!!!! Thank you so much for this! The biggest thing is still to save several copies of your working file as you will probably mess the first ones up when trying to network render, but once you get it, IT WORKS EVERY TIME!!!!

    ReplyDelete
  29. Great tutorial!!! I am having one problem... When my Client is in network render I cannot edit the Material/Texture of anything...

    ReplyDelete