all you have to do is follow these simple steps
For a quick simple example, you only need to make sure you have your scene set up correctly in maya, and then make one small change to your shell environment before you can begin:
export PATH=${PATH}:/usr/aw/maya4.0/bin
setenv PATH "${PATH}:/usr/aw/maya4.0/bin"
you can either type those examples in every time you need them, or save yourself the keystrokes by putting them in your default rc files. for people who use bash, that's .bashrc. for people who use tcsh, that's .cshrc. If you don't know what shell you use, it's probably tcsh, so go ahead and try it with that. If it doesn't work, then you're probably using bash.
okay, now we're ready to render. Assuming you have a scene called Foo.mb, you can Render your scene like so:
Render Foo.mb
Simple, no? Well now that you've done that, let's talk about more advanced uses of this ability
nohup
nohup
is a simple shell command that tells the program it's told to run
not to exit when you log out. It's great for leaving long running processes
in the background without having to keep a shell open--i.e. keeping them
running in case you need to or accidentally log out (or if the windows
computer on which you've logged in freezes and needs to be restarted.)
nohup Render Foo.mb &
nice nohup Render Foo.mb &
Again, pretty simple. the '&' tells the shell to not only nohup
the command, but to also run it in the background, letting you continue on
with whatever else you want to do. It will probably say something like
Sending output to nohup.out
. By default,
nohup
spits all of its output (both stdout
and stderr
) into a file called nohup.out
, which can be very
useful for examining in case something doesn't work correctly with your
job. nice
tells the operating system to give the command a
lower scheduling priority, which is very "nice" to other users of the
computer (but won't make it slower if no on is using the computer)
A simple example of batch rendering uses two of the commandline options to
Render
, see if you can follow:
ssh -f cream nice nohup Render -s 1 -e 10 Foo.mb &
ssh -f oil nice nohup Render -s 11 -e 20 Foo.mb &
ssh -f milk nice nohup Render -s 21 -e 30 Foo.mb &
the -f
option to ssh
tells ssh
that
you're not really wanting to log in to do any more than run the given command
at each of the destinations (i.e. cream, oil, milk). If you are already using
ssh-agent, this is the same as the -n option, and you won't be asked for
your password.
sleep
, and other methods to defer rendering to a certain timeusing the commands such as sleep
,at
, or by
starting and editing a crontab file on one of the linux macchines,
you can specify to start the rendering at a later point in time (like, if you've finished one project, but don't want
to start rendering while you're working on the next project, or if you don't
want to start rendering while other people are using the computer because
you're a polite student).
sleep 2h 30m; ssh -f milk nice nohup Render -s 21 -e 30 Foo.mb &
ssh-agent
to make life easierusing ssh-agent
and your own personal ssh
private/public DSA key pair, you can ssh from machine to machine without having
to enter a password. This is great for writing scripts to automatically farm
out your rendering jobs, or for using the preceding sleep
example.
cream[~]13:01:32$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/finney/.ssh/id_dsa): (enter)
Enter passphrase (empty for no passphrase): (enter a passphrase)
Enter same passphrase again: (enter it again)
Your identification has been saved in /home/finney/.ssh/id_dsa.
Your public key has been saved in /home/finney/.ssh/id_dsa.pub.
The key fingerprint is:
aa:0d:e0:83:ef:2e:21:fd:ba:62:d6:a4:8c:99:13:5a finney@cream.cs.swarthmore.edu
next, copy your id_dsa.pub
file to a file called
/home/yourusername/.ssh/authorized_keys2
.
next, put this in your /home/yourusername/.xsession
, just
before the line that calls your windowmanager:
eval `ssh-agent`
ssh-add .ssh/id_dsa <dev/null
the next time you login to your favorite machine, you'll be prompted
by a little program that asks you for your passphrase. enter it, and then
ssh
happily and password-free for the rest of your session.
(note: you can also enter those two commands on the command line, if you're
logged in remotely)
1337
renderingAlas, I am not 1337
enough to say I could tell you how to
be a grand master and command line rendering. I have, however, ganked all
of the command line options that you can pass to Render
, and
put them in a file, here.
(happy rendering)