Table of Contents

Rendering!

This is meant to be a general guide on how to render for the On-A-Slant project. The biggest thing to keep in mind is that it is a little hacked together. We're interested in rendering the frames, not having a elegant rendering farm. So there are some…rough edges, shall we say.

Hrothgar Status Information


First, there are two main sites to find information about what's currently rendering. At the bottom of http://hrothgar.cs.ndsu.nodak.edu/maya/, clicking “Show Current Statistics” will show which machines are presently rendering, including the frame, start time, and estimated progress.

http://hrothgar.cs.ndsu.nodak.edu/maya/status/ shows the current status, and a list of the last 1000 frames rendered. You can click on the links for each frame to see what the results are. To save space, the non-watermarked image (i.e., no frame number in the top left corner) are generally not saved, as we don't have the space for such things. But the watermarked image is always available until deleted by you.

A Rendering Walkthrough


Byobu

First, log into Hrothgar via SSH. If you don't have an account, contact support@cs.ndsu.edu.

For this project, I've found Byobu to be a useful tool. It's essentially a front-end for GNU Screen, with a couple of nice features.

So first, type Byobu on the command line. You'll see status information near the bottom of the screen, along with a list of shells presently open. Control-a d (type Contol-a at the same time, followed by just typing d) will detach the current session. You can then log in at a different time, type 'byobu' and the session will continue. For rendering, you often let a session hang in the background, which is why Byobu is useful.

To create a second shell with Byobu, type Control-a c. You'll now see two shells at the bottom. To create more, type Control-a c again. To move between shells, type Control-a n or Control-a p (for next and previous). If you wish to rename a shell, you can do so by typing Control-a A. You're then prompted to change the name.

Copying the new files over to the 244 lab.

Once logged into Hrothgar, you should navigate to /opt/maya-daemon/bin/. This directory has an assortment of scripts and other resources.

Rendering occurs within the 21 workstations in the 244 Linux Lab. A script exists to copy the necessary Maya files over to the 244 lab. To run this script, type:

perl svn-update-244.perl

This'll just copy over files that have changed, so it should be quick (a few minutes). Be aware of any messages in red, as they're warnings, and are probably worth reading.

Setting up a Render Job

The main script that runs render jobs is named 'dispatch.perl'. There are a few different types of jobs worth running. To change the job, simply open up this file and comment/uncomment out the parts you want (I'm serious, I wasn't expecting other humans to render 😞 ). To edit this file, type:

nano dispatch.perl

There's a lot there, but the main part you should be interested in is the two variables named '$camera' and '$theMB' (for the Maya Binary). For example

#my $camera = "lodge_left"; # Village
#my $camera = "camera10"; # Village
#my $theMB = "Village.mb";

#my $camera = "lodge_left"; # Ending
#my $theMB = "Ending.mb";

#my $camera = "camera4"; # New Ending
#my $theMB = "Ending.mb";

my $camera = "camera4"; # River to Palisade
my $theMB = "World.mb";

#my $theMB = "slant_interior_20100623/atl_fal_lodge_inter_v33_Updated_20100624.mb"; # Interior
#my $camera = "left";

#my $theMB = "dragonfly_original.mb";
#my $camera = "leftCamera";

The above configuration will render the World.mb file with the camera being 'camera4', since those are the two that are not commented out. If you wish to render the ending frames, you'd comment out the World.mb and 'camera4' and uncomment 'lodge_left' and 'Ending.mb'.

In general, that's all you need to edit in that file. Everything below deals with updating the database and communicating with the nodes.

Now to actually render some frames, you need to specify which frames to render. The frame numbers to render are defined in 'gap.list'. Of course, manually typing out each frame number is a hassle, so you can use a command to do that, too.

seq 500 1000 > gap.list

This will print the numbers between 500 and 1000 (inclusive) into the gap.list file.

Now, finally, let's render.

perl dispatch.perl JOB_NAME

This will begin dispatching frames to the nodes. Job name is completely up to you, it's just a name in the database and filesystem to keep jobs straight. I've used the naming scheme r###-name, where ### is the SVN revision number, and name is some descriptive name that'll tell me what's going on. For example, earlier I ran…

perl dispatch.perl r263_test1

as I was testing the scripts to make sure they work. Other examples are 'r254-world' as this was the world model at that revision.

At this point, frames will be dispatched to each node. Once a node is complete, it will request another frame. It will continue requesting frames until there are no more frames to request.

Retriving the Frames

A completely seperate daemon is responsible for retrieiving the frames. Located in /opt/maya-daemon/bin, this script is simply named 'take.perl'. This is much simplier, it just queries the database automatically to see if any jobs have completed, and if so, grabs the image and the log.

Where do the images go?

The images themself are dumped into /mnt/pngs under their respective job name. There are two directories, one named JOB_NAME and another named JOB_NAME-water. The second one is the one with the framenumbers in the corner. Which is handy.

How do I make a video?

Also in /opt/maya-daemon/bin, you'll find a script named 'mencoder.bash'. This simply takes one argument (the job name) and makes a video of those frames. The resulting file is dumped into /tmp/. For example:

bash mencoder.bash r263_test1

will make a video of the frames I rendered while writing this tutorial. You can then transfer that file to your local computer, or in a web directory so others can download and view it.