Batch Rendering in Maya

table of contents

Normally, when you render stills, you simply choose the Render Current Frame option as you work. However, as you saw in Chapters 4, "Diving In: Your First Animation," and 12, "Cameras and Rendering," you can adjust the Render Globals settings to cover a range of frames, and then use the Render Batch Render option to render the entire sequence. The renderer works on these frames in order and can store the frames in a movie format (such as AVI) or as sequentially numbered stills. For output to video or movie film, you normally output to sequential frames to avoid compression damage and a single unwieldy large file. When batch render mode begins in Maya, the rendering starts in the background and you can continue to work in Maya. Users with dual-processor machines can use the Batch Rendering Options dialog box to specify that one processor be used for background batch rendering and the other be used for continuing to work with Maya. However, you can batch render only one project at a time in Maya. If you want to render an additional project, you must cancel the current rendering or wait for it to finish.

When batch rendering starts, you get an update on its progress in the right side of Maya's Command Line. To display the entire log (see an example in Figure 15.1), click the Script Editor button to the right of the Command Line (refer back to Figure 2.1 in Chapter 2, "A Tour of Maya," to see exactly where this button is).

Figure 15.1. The command feedback log in the Script Editor shows details of the background batch render.

graphics/15fig01.gif

Batch Rendering as a Standalone with the Command Prompt

What if you have built 12 different scenes during your workday , and you want to have them all render during the night? One option is command-prompt batch rendering. If you look in your Maya\bin folder, you'll see the file render.exe. This utility is the standalone renderer called by the command prompt.

In Windows, you open the command prompt by clicking Start Programs (or Programs Accessories) MS-DOS Prompt. At the command prompt, enter cd to change directories to the Maya\bin directory, as shown in Figure 15.2. Then you can render a job by typing the following:

 render  filename  .mb 
Figure 15.2. Starting rendering in the command-prompt window.

graphics/15fig02.gif

You might need to specify the exact pathname for the file, as shown here:

 render c:\myjobs\maya\  filename  .mb 

The stored Maya scene file controls which files render at what resolution and specifies where the images are saved. You can override the settings in an .mb or .ma file by using this format:

 render <  options  >  filename  .mb 

Here's the same line with some options filled in:

 render -x 512 -y 512 -cam persp -im test -of sgi  filename  .mb 

Note that a space is placed between each option flag and the value assigned to it, such as “x (overriding the width in pixels) and 512 (the width you want in number of pixels). A host of options are available, and you can get a full list by entering just render more and using the spacebar to advance through each page.

How does all this help you render multiple jobs in one go? By using .bat batch files. You can create a text file with the suffix .bat that contains a number of these commands, as shown here:

 render -x 640 -y 480 -cam persp -im testA Job1.mb render -x 800 -y 600 -cam TopCam -im testB Job2.mb render -x 320 -y 240 -im testC -of tga Job3.mb 

You can run them all in sequence by simply starting the batch file from the command prompt. For example, if you took the preceding command lines and saved them in a text file called Tuesday.bat, all you need to run at the command prompt is Tuesday and the jobs are processed in order.

trap

You should use Windows Notepad to make text files. If you use MS Word or some other text editor, the file isn't raw text, but often has codes for font, pagination, and so on, and will not work when you try to run the batch file.


If you have purchased a maintenance contract from AliasWavefront for Maya, you can get an unlimited batch rendering license in addition to your regular Maya license. The batch rendering license allows you to install and authorize Maya's Batch Renderer on one or many other machines and to render jobs on those machines. You can give each machine a few batch render jobs to work on and they will create and save all the rendered images for each job loaded.

You might notice that although you can try to evenly distribute seven jobs across three machines, no matter what, some machines finish first and remain idle while frames of animation still need be rendered on other machines. Also, the prospect of having to walk around a room full of machines and set up .bat files on each one is going to get tiresome after a while! The next section covers true network rendering, which is the only way to go if you have several computers capable of rendering.

Batch Rendering with Slave Machines

There are a variety of third-party utilities (typically costing a few hundred dollars) for sharing Maya rendering jobs among multiple networked computers. These products enable you to manage all the network "slave" machines from one master machine. You can assign a job to all machines or just to specific machines, and you can order the jobs in the queue by priority. All the slave machines must be able to read texture map image files and other data from a shared folder. Also, all the machines need to be able to write files to one common place for output of rendered images. One other consideration is that if you intend to render to a movie file, you won't be able to share a job among several machines. However, you can render the individual frames and quickly post-process the frame sequence into any movie file format by using a compositor or other utility. Some of the available network rendering managers for Maya include:

  • Render Max (rendercorp.com)

  • Lemon (www.ice.org/~martin/)

  • Muster (vvertex.com)

  • Rush (3dsite.com/people/erco/rush/)

  • Load Sharing (platform.com)

These are commercial products with a variety of pricing structures. Lemon has a free version that can split jobs among machines, and it works well for smaller productions . It leaves out such features as progress tracking and adjustment of Render Globals. For single-machine job queuing, RenderPal (www.shoran.com) is a better utility, and it's also free. There are more utilities, such as RenderPal, at the popular Maya web site www.highend3d.com.

The only critical factor when using a machine to render a job is that it must be able to load the entire scene into RAM. If your scene file is bigger than the available RAM on the slave machine, processing will bog down. If RAM is plentiful, the machine will render based solely on raw CPU horsepower.



Maya 4. 5 Fundamentals
Maya 4.5 Fundamentals
ISBN: 0735713278
EAN: 2147483647
Year: 2005
Pages: 201

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net