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/

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:// /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

Monday, 23 April 2012

Inventory Booking mechanism for Inventory

Now I'm getting into Joomla, thought I'd check out a few inventory booking extensions. Found one which looks excellent - JomRez

Here's a demo of it on their servers.

With this system I can visualise the situation working as follows:

  1. Browse to the correct webpage
  2. log in
  3. if your a student:
    1. search for the resource
    2. book it out if it is free
  4. if your staff
    1. add resources
    2. check booking status
    3. sign back in
    4. search for free resources
  1. could it use Active Directory logins?
    1. Yes, I think so. Found this forum on the topic although couldn't look at it
  2. does it manage assets?
One thing I have read is that it is good, but to get it really customised you will probably need to buy the extensions. These generally start at £9.99 and go up to £29.99.

The next thing to do is to test it:

  1. install MAMP
    1. make a new database in myphpadmin
      1. I named it "inventory"
  2. install Joomla
  3. download JomRez and install
    1. found this article on how to install
      1. download Download or just jomres_webinstall.php
      2. Place this in the root of the joomla
      3. run the jomres_webinstall.php in the browser
        1. this came up with:
          1. We are unable to comunicate with the updates server, you might have a firewall preventing your server from communicating with the servers. You should create some rules that allow your server to communicate with the domains "", "" and ""
          2. I could ping all of these from my machine?
        2. So, might as well just install it manually
      4. Nope, can't find the manual install zip.
      5. installed it on a server using the webinstall and worked fine
  4. add assets
    1. as it's geared for hotel bookings the only way I've thought of doing it is to add each asset as a room in a hotel.
    2. I'd have to go into the database and find the room type and add a different room type for each different item we had.
  5. test asset management
    1. can't really manage assets
  6. test booking mechanism
  7. test logins
Well, to conclude, if I want this to work as an inventory management utility I'd need to buy plugins. It's ridiculously restricted.

The way I can concieve to make it work is to have the college as a hotel, and it have 'room types'. You can have a number of each room type, each bookable. Too confusing.

Had another look on Joomla and found only paid things! Doh! Can't get everything for free. I shall go back to Access Databases.

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\

  • 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[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:

Looking here you find most of Backburner including a link to the Documentation:

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

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:

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:

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:

It is currently 'localhost'.

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

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

. /Applications/Autodesk/maya2012/
render /path/to/file.mb

The ". /Applications/Autodesk/maya2012/" 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.

Friday, 13 April 2012

OS X automatically changing a password

This is a follow up from the post which describes the problems with 'locking' down a printer. I've finally decided that we are locking down the computer attached to the printer, and changing it's password each day so only people who know the password can print.

So, I've just tested "passwd" command and found it quite useful. It has given me a few ideas.

  • When typing "passwd" when you're already logged in
    • it assumes you're changing your password
    • It asks for your old one, a new one, and retype the new one. Done.
  • When typing in from an admin account "passwd stephenl"
    • it asks you as if you were the user whose password is being changed as before.
  • When doing this through root login (i.e. from Apple Remote Desktops send command)
    • it just asks for a new password twice. Easy.

So, I worked out two ways I could do this:

  1. I could simply have some scheduled tasks setup in ARD which sends these commands on certain days
  2. I could set up a totally self sufficient system when the machine is switched on, it looks at the day, and determines which password to use.
Number 1 is the easiest as I know how to do this.
Number 2 is harder as I'd have to write a script which:
  1. loads at startup
  2. uses root to change passwords
  3. finds out what day it is
  4. changes the password accordingly
Now I've written it out in logical order it doesn't sound too difficult.

Just found this post which describes how to simply make a startup script

Moving a site to Joomla

So, here I am moving to Joomla. I thought I'd best keep notes so I don't loose where I am when I finally give up for the day.

So far I have downloaded and installed the latest Joomla - 2.5.4 on the home machine and put it in the folder - /WallSpaceVisualArts/

I've ran the setup wizard:
  1. The admin user is me with my usual password.
  2. The sites database is - wallspacevisualarts  (all lowercase). Admin for this is root. My own password.
  3. I didn't install the sample data set.
The plan is relatively simple. I put the whole website on there, minus the content that can change. For the moment the only content that is changing is the tabulated text in the tabs. These can be articles which are always shown.

I want to eventually make the pictures an article also, but this would require much more work.

Here's the plan in chronological order (or maybe not so chronological):

  1. get the documentation to know how to make a template
    1. here it is
  2. take out the css and put in a file
    1. I called the file "main.css" in the css folder
  3. make the template files and folders
    1. made the root /Joomla Website/Templates
    2. made one inside called /WallSpaceVersion1/
    3. Made /css/ and /images folders
    4. made templateDetails.xml
      1. copied all info from link above and made it relevent
    5. made index.php
  4. move ALL images into "images" directory
    1. moved images from "assets" directory to "images" directory
    2. change any mention of "assets" with "images"
  5. Change the way the tabs work so that they are called "tab1" and the information attached to each tab is called "tab1_info" to make more universal.
  6. re-write the templateDetails.xml to encompass all the files used
    1. if you declare a folder, do you need to declare the files in that folder?
      1. looking at atomic's templateDetails.xml, they just put the files in the root folder
      2. I think you just declare the files that you want to be editable
  7. put the right bits of code in the right places
  8. delete text
  9. replace text with relevent code which brings up articles
    1. Just found this article about Jdoc statements. It will hopefully work nicely
    2. So, having looked into it, I found that what I actually wanted was to make each article a "Custom HTML" module. Each of these modules is then assigned a position in the page
      1. Here's an example of what I put in the html code:
        1. <jdoc:include type="modules" name="menu1" />
        2. and for the module I assigned it to position "menu1.
        3. don't forget to declare the menu1 in the templateDetails.xml document
  10. make into template
  11. put in joomla
    1. had a little trouble with this. It turns out the "discover" button doesn't work well. The template turned up in "templates" tab but not in "styles" tab! Had to zip it and install it!
  12. test
    1. with initial testing, the images didn't appear
      1. here's the code that I eventually used to link pictures placed in the template:
      2. basically, where-ever you have
        1. ="location.jpg" you replace with:
        2. ="baseurl; ?>/templates/location.jpg
  13. make johns login
  14. make a space for it in index.php and declare it in templateDetails.xml
  15. upgrade account to Home Pro
  16. make database on Daily (limited to 20 databases)
    1. described it as "wallspacevisualarts"
    2. db name is wallsp_1
    3. To get on the database, you can go to
      1. it runs on phpmyadmin
    4. normal password
  17. backup joomla on home machine
  18. backup old website on daily server
  19. restore on daily server
  20. give him a tutorial

Thursday, 12 April 2012

MacBook Pro Trackpad "not working properly" in Windows XP

Whenever I reimage MacBook Pro's with Windows XP I always have the same problem with the trackpad.

When you boot up, the trackpad does not function. Logging in and going to device manager you see that there is an exclamation mark over the trackpad. It simply says something like:

This device is not working properly. Error 16

Uninstalling, reinstalling, disabling, enabling does not fix it.

I reinstalled Bootcamp 3.0 drivers which did not help.

I found this forum quite interesting. Seems to mention about uninstalling some Windows Apple things in "Add/Remove Programs". But I didn't try this.

I next updated to Bootcamp 3.1 drivers and rebooted. Worked a treat!

Update - 24/09/2012

Well, just reimaged a macbook pro and the same problem occurred. Installed Bootcamp 3.1 and it didn't work!

Finally had a look at the forum mentioned above and the solution they gave worked. More specifically:

  1. go to Device Manager and update the driver for the trackpad.
  2. click "No, not this time" for internet update.
  3. Click, "install from a list or specific location".
  4. click, "Don't search, I will choose a driver to install"
  5. Choose the generic driver.
  6. Click finish
The trackpad starts to work but no multitouch facilities. This is the point you install/reinstall bootcamp 3 and 3.1.

After this it works a treat.

Tuesday, 3 April 2012

Scanning with the Nikon CoolScan 8000 and Nikon Scan 4

To scan in your negs/slides in a high quality you are best off using the Nikon Coolscan 8000.

Log in and load Nikon Scan 4 located in - Applications > Nikon Software > Nikon Scan 4

  1.  When Nikon Scan is fully loaded, switch on the Nikon Coolscan 8000, making sure the cover is up (closed)
  2. When you get a message on screen that the cover is up, push the cover down. 
  3. Load your film/slides into the holder
  4. Load the holder into the scanner. Look for the arrow on the holder to orient it the correct way. Be gentle and eventually it will take the film in.
  5. You may need to wait, but eventually a pull out button will appear on screen. Click this to see the number of slides.
  6. Click on a slide (or hold down shift to select more) and press preview. This will do a 'quick' scan of the slides.
  7. Clicking on one of these slides now gives you a preview
  8. Click a slide (or multiple) and click "Scan"

If you've selected multiple slides, another dialogue box appears. Click on “Browse” and navigate to one of the Local Hard Drives - i.e. Scratch Disk or OS X > Users > Shared

NOTE: You cannot save to you Home Drive, you need to save to the Machine.

If you've only scanned in one slide, when it has finished it will load this image up. You need to save this.

Click - File > Save. Navigate to one of the Local Hard Drives - i.e. Scratch Disk or OS X > Users > Shared