Showing posts with label renderfarm. Show all posts
Showing posts with label renderfarm. Show all posts

Monday, 9 March 2015

Blender Render Farm Tutorial

This tutorial will talk you through how to use the Render Farm in S721. You will be able to submit a job, and collect the files when finished.

  1. Load up Blender 2.73a found in Applications > Blender 2.73a > Blender
  2. You will need to enable the render farm plugin
    1. Go to File > User Preferences
    2. Go to "Render" on the left hand list
    3. Enable "Network Renderer"
    4. Close this window
    5. At the top go to where it says "Blender Render" and select "Network Render":
    6. On the lower right hand panel you will see the controls for network rendering:
    7. Once a job is submitted you will have to wait until it is complete before collecting the files.
On the Master Machine (the Mac Pro teaching machine) you can log in and access the queue viewer.
  1. Open a web browser on this machine
  2. in the URL type
    1. http://localhost:8000
 Done

Thursday, 12 February 2015

Blender render farm - built in Network renderer

Well, I tested this last year, but I can't believe it, I can't find any mention of me doing it. It either means I forgot to write it up, or didn't write it up in this blog! Oh well, here's a new writeup:

The only files I have to go from are two files named:
master.blend
slave.blend

Basically, these files have presets in them, so whichever machine opens them either becomes the master or the slave.

Here's a document I found which has 'slave.blend' mentioned in it, looks very promising.

  1. First thing is to load blender, and load the Network Renderer plugin. Go to:
    1. File > User Preferences > Render > Network render > tick:
  2. Up the top, next to File, Edit menus, there is a dropdown usually on "Scene". Select "Network Render":
  3. On the far right you should see the Network Render settings:
  4. Click Master on the machine you want to control jobs. Make sure it's a machine which is always on, perhaps with storage space which can be shared to other machines (not worked out where rendered files are stored)
    1. Click Start Service
  5. You can now view the jobs and clients connected to the master by browsing to the webpage:
    1. http://ipAddressOfMaster:8000:
      1. I had trouble with this, but found it was because I was on the master machine and so had to type:
        1. http://localhost:8000/
      2. There is also a newer jquery interface: /html/newui#interface:
  6.  Now start another machine as a slave
  7. On the final machine, load up a nice file and click "Send Job":
  8. The systems so good, the end files end up where-ever you said for the output (at the bottom of the client list). You can even download renders from previous jobs!!

Now that I got it all working, the plan was to save a master.blend file and a slave.blend file and have them load up when the machines are started, from command line. Here it goes:

 To run the master:
/Applications/Blender\ 2.73a/blender.app/Contents/MacOS/blender -b /Users/Shared/master.blend --addons netrender -a -noaudio -nojoystick

The slave:
/Applications/Blender\ 2.73a/blender.app/Contents/MacOS/blender -b /Users/Shared/slave.blend --addons netrender -a -noaudio -nojoystick 

Seems to work very nicely. One thing to note is that the IP address of the master has to be saved in the slave.blend file. I don't know how to add this through the command line.

The next thing is to get the slave.blend command to launch at system startup, and run as root.

Found this question and answer in stackoverflow 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>uk.ac.chesterfield.dci.blender.client</string> <!-- org.mongodb.mongodb perhaps? -->

    <key>KeepAlive</key>
    <true/>
  
    <key>RunAtLoad</key>
    <true/>
  
    <key>ProcessType</key>
    <string>Background</string>

    <key>UserName</key>
    <string>root</string>

    <key>ProgramArguments</key>
    <array>
            <string>/Applications/Blender 2.73a/blender.app/Contents/MacOS/blender</string>
            <string>-b</string>
            <string>/Users/Shared/slave.blend</string>
            <string>--addons</string>
            <string>netrender</string>
            <string>-a</string>
            <string>-noaudio</string>
            <string>-nojoystick</string>
    </array>
</dict>
</plist>

Wednesday, 21 May 2014

Blender render farm for OS X in background

Hi, I want to set up a render farm at our College to run on any machine in the background with minimal installation and setup.

It looks like the built in render farm to blender is only acceptable on smaller scales where all machines are logged in, and have blender open and running. This isn't the right solution for me.

A while back I set up a render farm for Maya using OS X Qmaster. This runs in the background without anyone logged in, receives jobs and executes command line arguments. A network share is mounted on all machines running it. Looks like Qmaster isn't set up correctly on Mavericks, also might be some compatibility issues for it too. Looks like you can set up with command line:

sudo SystemStarter start Qmaster
qmasterprefs -list
Current settings:
 -sharingType servicesAndQuickCluster
 -launchContentAgent off
Bus error: 10
qmasterprefs -cluster on servername "test1"
Bus error: 10

I'm getting "Bus Error: 10" every time I run any commands

I also setup Blender to render over Xgrid, but Apple has pulled this out of the new servers so I'll give this a miss for now.

Farmerjoe render farm, looks alright. Need to install Perl I think.

DrQueue looks interesting, but you do need to compile it first.

Backburner is more promising, as we can also use it for Maya and any autodesk app. Found an article here which almost proves it. So here's my attempt a few years ago to get it working. I tried once more but couldn't get the web monitor working, might be because I've got the server app installed? Or it's mavericks? I shall continue with this.

Wednesday, 25 April 2012

Rendering with Maya Terminal command line

So, want to start a render farm, which essentially sends command line commands to computers. You can do this yourself really.

I thought I'd document the command line stuff so that I can come back to it some other time.

So, to open the Maya Terminal, you can open up Terminal and type:
. /Applications/Autodesk/maya2012/Maya.app/Contents/bin/MayaENV.sh

Now you'll have access to Maya terminal commands.

Here's a simple line to render a file:
render /Users/me/test.mb

Simply renders the file with the settings that are set inside that file (in the render settings).

You can use flags with this command to set all kinds of things. Found a good help page here. The ones I'm interested in are:

  • -r mr
    • uses mental ray for renderer
  • -rd /Users/Shared
    • uses the specified directory for rendering to
  • -s 1
    • sets the start frame of sequence to render
  • -e 100
    • sets the end frame of sequence to render
  • -reg 0 250 0 250
    • sets the render region to render 
    • (left right bottom top)
    • it's key to note that co-ordinates 0, 0 are at the bottom left of the image, so 0 250 0 250 renders a 250px square at the bottom left as pictured
    • it creates a file of the proper resolution, and fills in the part which was rendered
    • to combine, make sure each render 'region' has a different file name, peice it back together in photoshop
  • -im mylovelyfile
    • saves the render with this name
  • -x 250
    • renders this amount of pixels width-ways
  • -y 250
    • renders this amount of pixels height-ways
  • -cam persp1
    • the name of the camera you want to render from
  • -proj /Users/Shared/
    • uses this folder to load file
  • -n 0
    • use all available processors
If you're using mentalray, you can also use:
  • -art
    • mentalray measures how many cores you have and adjusts to maximise performance
  • -v 5
    • for render percentage
For a render farm, each node will need access to the .mb file and all the textures. It's also good to have them render to the same folder so you don't have to collect it all. I'd have the files on the server and run this command:

(first make a directory to mount the shared folder onto)
mkdir /Volumes/renderfarm
(then mount it)
mount -t afp afp://admin:password@my.server.dns.name/MySharedFolder /Volumes/renderfarm

I'd also be tempted to load the file up from this mounted directory and make sure the project path corresponds to this, so it can find all the sub-directories for textures and such.

On each computer you simply type the range of files to be rendered, so:
render -r mr -s 1 -e 10 -rd /Volumes/renderfarm/rendered/ -v 5 -art /Volumes/renderfarm/file1.mb
render -r mr -s 11 -e 20 -rd /Volumes/renderfarm/rendered/ -v 5 -art /Volumes/renderfarm/file1.mb
render -r mr -s 21 -e 30 -rd /Volumes/renderfarm/rendered/ -v 5 -art /Volumes/renderfarm/file1.mb
render -r mr -s 31 -e 40 -rd /Volumes/renderfarm/rendered/ -v 5 -art /Volumes/renderfarm/file1.mb
render -r mr -s 41 -e 50 -rd /Volumes/renderfarm/rendered/ -v 5 -art /Volumes/renderfarm/file1.mb

Thursday, 19 April 2012

OS X Maya command line rendering with ssh

So, we have a lot of Apple Macs here, some very, very nice Mac Pro's. I have previously attempted to set up a render farm through X-Grid, which is managed through a Mac OS X Server.

I've just found Autodesk's Backburner is now available for mac, but I think it might not have an Administrator GUI for OS X, just Windows? I'll look into it. Anyway, found this little video on how to get a mac client working with backburner(submitting a job and using it as a render node)

But my original purpose in making this post was to catalogue how I'm going to use the command line to render (until I get backburner up and running).

So, I've installed Maya 2012 on a nice fast machine (not mine) and I want to render a job on this nice machine. So I open up terminal and type:

ssh 123.456.7.89
password....

. /Applications/Autodesk/maya2012/Maya.app/Contents/bin/MayaENV.sh
render /path/to/file.mb

The ". /Applications/Autodesk/maya2012/Maya.app/Contents/bin/MayaENV.sh" line loads up Maya Terminal.

It renders whatever you have set up in the file. i.e. I set up for it to render one frame from perspective camera at 1080p resolution on Production Quality to: /path/to/maya/project/folder/images/.

You can add more information via the 'render' command. Type:

render -h

to get a very long list of arguments for the render command.

Thursday, 4 February 2010

Blender Render Farm with X-Grid

Well, with my new project only begun I thought I'd optimistically look into a render farm using X-Grid on our Mac OS X 10.4 server (a little outdated though).

So, after not much time I found this article:
http://www.atpm.com/10.06/blender.shtml

and it looks almost complete. Watch this space, although you might have to wait until I have a large enough project to render!

Also, here are the Blender command line arguments:
http://download.blender.org/documentation/html/a19823.html

I'd just like to note that if all goes well, I could easily adapt this for Maya!!