Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts

Saturday, 20 April 2013

enabling and installing pureftpd on Mac OS X 10.7

So, my computer is also acting as a web development server. As such, I'd like to access the files from anywhere so I decided I'd like something like FTP setup. But reading the forums FTP is a big no-no. Which is probably why Apple switched it off for OS X 10.7.

So, what are the alternatives:
PureFTPd

But how to install? Well, it needs to be compiled and then installed. Found the process here on an Apple Forum 3rd one down. He states:

find /usr/local -type f -name 'pure-*' | tar -czf pure-ftpd_backup.tgz -T -

tar xzf pure-ftpd-1.0.32.tar.gz
cd pure-ftpd-1.0.32
./configure --with-everything --with-tls --with-certfile=/etc/pure-ftpd/ssl/pure-ftpd.pem --sysconfdir=/etc/pure-ftpd/ --with-sysquotas --mandir /usr/local/man --with-pam --with-virtualchroot  --with-peruserlimits --with-ldap --with-rfc2640
make
sudo make install-strip
cd ..
rm -r pure-ftpd-1.0.32.tar.gz pure-ftpd-1.0.32
After this you can install PureFTPd Manager which should provide you with a GUI, although it states it works for OS X 10.6. Apparently works for 10.7.

Seems to work alright, although I'll have to read up about changing ports and setting up sftp stuff

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.