Showing posts with label Maya. Show all posts
Showing posts with label Maya. Show all posts

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

Friday, 20 April 2012

Deploying Maya 2012 and Backburner

So, I want to set up a nice little render farm, and so need all machines to have the software on. First things first, deployment.

I had a look at the Maya install dmg and found that the initial application is not a pkg file. But fortunately, inside the package contents:
/Volumes/Maya/Install\ Maya\ 2012.app/Contents/Resources/Maya....

  • Maya2012.mpkg
  • Additional Items
    • ADC_docs6.0.pkg
    • AdLM_standalone.mpkg
    • AutodeskBackburner2012.mpkg
    • AutodeskDirectConnect6.0.pkg
    • AutodeskUninstaller.pkg
    • Composite2012.pkg
    • CraftDirectorStudioMaya2012.dmg
    • Maya_quicktime_components.pkg
    • autodesk.backburner.monitor-2012.0_423_i386.pkg
    • autodesk.webentry-1.0-603.i386.pkg
    • backburner-2012.0_1560_i386.pkg
    • dmmPluginForMaya2012x64.pkg
All I did was to highlight all these files and have Apple Remote Desktop install them for me, minus "CraftDirectorStudioMaya2012.dmg" which I am don't think I need.


On going to the computer I tested this process on, I found that a user was already logged on and a message saying:
a certain process needed "Rosetta" installing should I do so?

I clicked yes and forgot to read which Application it was. Looking in the logs I found:
20/04/2012 11:44:06 com.apple.coreservices.uiagent[1050] 11:44:06CoreServicesUIAgent[1050] : Application failed to launch (id = aksusbd, version = Unknown reason = kLSNoRosettaEnvironmentErr)

It was this "aksusbd" which needed it.

I also found in the logs that the install process tries to start backburner and comes up with the same error message I came up with here:
/usr/discreet/backburner/backburner: line 64: syntax error: unexpected end of file


I can fix this simply by copying the fixed version of the backburner file


just found this update for backburner. Found on this page

Thursday, 19 April 2012

OS X Maya 2012 and Backburner

So, I'm getting up and running with Maya and I want to eventually use as many machines as possible to render from (I have about 100 machines, 4 of which are super-duper!). So where to start. Well, just found the Maya documentation and found the specific Backburner very small section on Page 175.

One interesting bit is about where to say which machine is the "Manager". This is in the folder:
/usr/discreet/backburner/cfg


Looking here you find most of Backburner including a link to the Documentation:
http://download.autodesk.com/us/systemdocs/pdf/backburner2011_user_guide.pdf


note: can't find backburner 2012 documentation!


So, reading backburner 2011 user guide pg.77 to start, stop and restart backburner in terminal type:

sudo /usr/discreet/backburner/backburner stop
sudo /usr/discreet/backburner/backburner startsudo /usr/discreet/backburner/backburner restart


I initially had a problem. Whenever I ran backburner it would come up with:


/usr/discreet/backburner/backburner: line 64: syntax error: unexpected end of file

Couldn't find any mention of it on Google. I had a look at the file and couldn't find anything wrong with it. Seems to just contain a list of 'if' statements. On line 64 it is concerned with 'stop'ping the service:
if [ "$1" == "stop" ]; then
   ${DL_BACKBURNERDIR}/backburner_server stop
   ${DL_BACKBURNERDIR}/backburner_manager stop
fi

I simply swapped these to lines and saved and it didn't come up with the error any more? There must have been an incorrect carriage return.

Anyway, carrying on, you need to stop the manager in order to edit the configuration. Configuration file is:
/usr/discreet/backburner/Network/backburner.xml

Details on what some of it means is in backburner2011 user guide page.81.

It looks quite good anyway, only two things I'm concerned about:

  1. the subnet mask to use
    1. unfortunately, my machine is on one subnet, and the rest of the macs are on another!
  2. what to name the manager
    1. currently is set to 'localhost'
    2. shall I rename it?
Now for the webserver.

Default username and password are:
backburner
backburner

pg.78 and 79 describe how to manage users.

to check the server and manager are running type the following and you should get some results:

n250-04524:Network leachs$ ps -ef | grep backburner
    0  1573     1   0   0:00.05 ??         0:00.08 /usr/discreet/backburner/backburnerManager
    0  1590     1   0   0:00.00 ??         0:00.00 /bin/sh /usr/discreet/backburner/backburner_server run
    0  1602 1590 0 0:00.02 ?? 0:00.03 /usr/discreet/backburner/backburnerServer -m localhost

Next, you need to make sure that the manager name is in the:
/usr/discreet/backburner/cfg/manager.host

It is currently 'localhost'.

Well, took about 5 mins but finally found where to get to backburner webpage!:
http://localhost/backburner/

Not documented ANYWHERE!!!

Well, it's a good start. I shall set the machine next to me as a server node.


Well, been quite unsuccessful at the moment. Can't seem to get:
  1. the web monitor to register the name of the manager
  2. any servers to connect to the manager
just found this update for backburner. Found on this page

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.

Sunday, 18 March 2012

testing MatchMover 2012 and Maya with camera tracking

So, i've been testing MatchMover to see how good it is with camera tracking. I've just done the tutorial, but with some footage taken in the garden.

After my first two tries with "automatic tracking" it didn't work too well. It can't seem to handle the HD footage with the compression on it. The amount of pixels per compressed block seems to put the tracking points off a little. One idea might be to make the resolution smaller, with the idea that this will make the compressed areas pixels themselves, and so not cause any confusion.

On exporting to Maya I noticed it did not put the image in the background of the camera. It came up with this error:

// Error: Unable to load the image file, '/Users/monkey/Desktop/Movies/DSCF0.AVI', for rzImagePlane1

For a start, the movie file was named: DSCF01525.AVI, and not DSCF0.AVI. Second of all it is a movie file! So, to fix:


  1. In the Viewport, select Panels > Perspective > rzCamera1
  2. Select the camera
  3. Go to the rxImagePlane1
  4. Change Type to "Movie"


Done.

I noticed when put into Maya the image slips a lot, certainly a lot more then in MatchMover. The only reason I can see for this is the fact I'm using a widescreen movie file, and the camera setup might not be the same.

The first thing I tried was to increase the frame offset. I changed it to '1' and it made a little difference, but still wasn't perfect. My next thing to try is to change the AVI into an image sequence. Thirdly, I'll have to look into the 'pixel aspect ratio'.

Now, the question of how to convert to an image sequence?

Answer: use MPEGstreamclip 1.9 and upwards. Cheers.

After converting to a sequence, I matchmover'd it and put it into maya. Perfect. It looked as good as it did in MatchMover. I can only assume it was to do with things like 'pixel ratio' and frames per second? Anyway, from now on I shall only use image sequences.

Wednesday, 14 March 2012

MatchMover 2012 OS X A valid license could not be obtained

Just got the free student version of Maya 2012 which comes with MatchMover 2012! Yay.


Maya is working fine, but MatchMover comes up with:



A valid license could not be obtained by the network license manager - error -1.359.2 (????)
License was not obtained - tried maya 2012 (657D1 2012.0.0.f), error 20
License method : environment variable Maya_License_method=’network’
Product choice : environment variable Maya_License=’unlimited’
License file override : environment variable Maya_alt_en is not set
This is the maya 2012 license.env
MAYA_LICENSE=Unlimited
MAYA_LICENSE_METHOD=Standalone
This is the adlminfo from matchmover…
type=Standalone
serial=xxxxxxxxxxxxx
prodkey=657D1
configuration=Unlimited

Just had a quick search and found this forum. Just a quicky really. Just have to copy the license.env from:
/Applications/Autodesk/Maya 2012/Maya.app/Contents/license.env
to:
/Applications/Autodesk/MatchMover2012/MatchMover2012.app/Contents/license.env

Works a charm. Must just be a bug with the Mac OS X version

Tuesday, 23 August 2011

Installing Maya 2008 on Mac OS X 10.6 or later

On my first day back and at 9:00 I had to put 20 iMacs on Active Directory and install Maya 2008, all because I had no idea their would be anyone using the computer suite. Active Directory was the easy thing, but I had problems when it came to installing Maya 2008.

I had two mpkg files on the server (taken from the install dvd's) one for Maya 2008 and one for SP1 (which turns out to be the full maya with sp1). Upon trying to install either it would say it was done and prompt for installation of Rosetta (although it turns out this is only if you need to run the serial authorisation program and do vector renders later). I looked in the Application/Autodesk/Maya 2008 folder only to find FCheck and a folder!

I did a few searches on the internet and found this very helpful blog post. It turns out the main Maya install pkg file only installs on 10.4 or 10.5 operating systems and no others! Not sure if this is standard procedure as it does say that it works on 10.4 or later. So just change the InstallationCheck file located in:

/Maya2008SP1.mpkg/Resources/Maya_core2008.pkg/Resources/InstallationCheck

To get there using the finder you need to right click on the pkg file and select "Show Package Contents"

So, basically change the section which says;

10.4|10.5|

and add
|10.6|

For some reason he's also added an * which is probably a 'wildcard' which I don't think is needed, but I haven't tested my hypothesis.

This worked just fine (although not with the original installer without SP1). I sent this to the task server to be installed which worked until the server crashed!