Setting up batch rendering
Using network rendering
Rendering on a network
Using network rendering servers
Logging errors
Using the Monitor
Event notification
Max can help you create some incredible images and animations, but that power comes at a significant price—time. Modeling scenes and animation sequences takes enough time on its own, but after you—re finished, you still have to wait for the rendering to take place, which for a final rendering at the highest detail settings can literally take days. Because the time rendering takes is directly proportional to the amount of processing power you have access to, Max lets you use network rendering to add more hardware to the equation and speed up those painfully slow jobs.
This chapter shows you how to set up Max to distribute the rendering workload across an entire network of computers, helping you finish big rendering jobs in record time.
If you work all day modeling, texturing, and animating sequences, only to find that most of your day is shot waiting for a sequence to be rendered, then happily you have several solutions. You can get a second system and use it for rendering while you work on the first system, you can use the network rendering feature to render over the network, or you have a third possibility: you can use the Batch Render tool.
Unless you are working around the clock (which is common for many game productions), you can set up a batch rendering queue before you leave for the evening, using the Batch Render tool. This queue runs through the night, giving you a set of takes to review in the morning.
The Batch Render window, shown in Figure 48.1, is accessed from the Rendering menu. Render tasks can be added to the list by clicking the Add button. Render tasks can be disabled by selecting the check box to the left of the task name.
For each task, you can set the task—s Name, Output Path, Camera, and render Preset. The Scene State drop-down list lets you select any scene states that are defined using the Tools Manage Scene States command.
Each new task added to the Batch Render window uses the default render parameters for its frame range, dimensions, and pixel aspect, but if you enable the Override Preset option, then you can customize each of these parameters for the selected task.
The Batch Render queue can be rendered over the network by enabling the Net Render option at the bottom of the Batch Render window.
A single scene file may have many different settings that you—d like to try as different renderings. For example, you can set up a scene with different light settings, with different camera properties, or with unique materials. Scene states let you define different sets of properties that can be recalled prior to a batch rendering. Each of these scene states can be part of a single Max file.
When the Tools Manage Scene States menu command is selected, the Manage Scene States dialog box appears, as shown in Figure 48.2, which lets you Save, Restore, Rename, and Delete the existing list of scene states. Clicking the Save button opens the Save Scene State dialog box, also shown in Figure 48.2. In the Save Scene State dialog box, you can enter the name for the scene state and select which group of settings to use. The options include Light Properties, Light Transforms, Object Properties, Camera Transforms, Camera Properties, Layer Properties, Layer Assignment, Materials, Environment, and Anim Layer Properties.
After a batch render queue is established, you can click the Export to .bat button to open the Batch Render Export to Batch File dialog box, where you can save the batch file as a .bat file. This saved file can be executed from the command line or by using an agent.
When you use network rendering to render your animation, Max divides the work among several machines connected via a network, with each machine rendering some of the frames. The increase in speed depends on how many machines you can devote to rendering frames: Add just one computer, and you double the rate at which you can render. Add seven or eight machines, and instead of missing that important deadline by a week, you can get done early and take an extra day off.
Machines connected to handle network rendering are often referred to collectively as a rendering farm. The basic process during a network rendering goes like this: One machine manages the entire process and distributes the work among all the computers in the farm. Each machine signals the managing computer when it is ready to work on another frame. The manager then sends or “farms out” a new frame, which gets worked on by a computer in the rendering farm, and the finished frame gets saved in whatever format you—ve chosen.
The software in Max that makes network rendering possible is called Backburner. You may have noticed that it was installed when Max was installed. Max has several features to make the network rendering process easier. If one of the computers in your rendering farm crashes or loses its connection with the manager, the manager reclaims the frame that was assigned to the down computer and farms it out to a different machine. You can monitor the status of any rendering job you have running, and you can even have Max e-mail you when a job is complete.
Note
One additional caveat to using network rendering is that you have no guarantee that the frames of your animation will be rendered in order. Each participating computer renders frames as quickly as possible and saves them as separate files, so you cannot use network rendering to create .avi or .mov files. Instead, you have to render the scene with each frame saved as a separate bitmap file, and then use the RAM Player, Video Post, or a third-party program (such as Adobe Premiere) to combine them into an animation file format such as .avi.
A licensed version of Max is required to do network rendering, but the good news is that only one machine in your farm needs to have an authorized copy of Max installed. No authorization whatsoever is needed on machines used for network rendering only. Simply install Max, and each network rendering machine gets its authorization from the computer that launched the render job.
Before getting into the details of setting up Max for network rendering, it—s important to understand the different parts of the network rendering system. This list shows the major players involved:
Now that you know all the pieces involved, you—ll need to set up your network and install a copy of Max on all the network machines that you plan on using. When installing Max on a network machine, you can use the Compact option so that Max installs only the minimum number of files it needs to be able to render. You also need to choose a destination directory where you want Max to be installed. If possible, just accept the displayed default destination and click Next.
Tip
Installing 3ds Max in the same directory on every computer can save you some maintenance headaches later on. Managing bitmap and plug-in directories is much easier if each machine has the same directory layout.
You also need to set up several shared directories on the network where the scenes and materials can be accessed from and where the rendered scenes can be saved. Once you have these shared folders in place, you are ready to start up your network rendering system.
The very first time you start your rendering farm, you need to help Max do a little initialization.
To initialize the network rendering system, follow these steps:
When the server finds the manager, it displays a message that the registration is accepted. The Network Manager window also shows a similar message.
If the server had trouble connecting to the manager, you need to follow these two additional steps:
Note
The network manager does not need to have a computer all to itself, so you can also run a network server on the same computer and use it to participate in the rendering.
Your rendering farm is up and running and just dying to render something, so let—s put those machines to work.
To start a network rendering job, follow these steps:
This should be as simple as possible because all you—re doing here is verifying that the rendering farm is functional.
A Network Job Assignment dialog box opens, like the one shown in Figure 48.7.
Tip
If you try to submit the same job again (after either a failed or a successful attempt at rendering), Max complains because that job already exists in the job queue. You can remove the job using the Monitor, or you can click the + button on the Network Job Assignment dialog box, and Max adds a number to the job name to make it unique.
After you—ve submitted your job, notices appear on the manager and the servers (like the ones shown in Figures 48.8 and 48.9) that the job has been received. Soon Max starts up on each server, and you see a Rendering dialog box showing the progress of the rendering task. As you can see, this displays useful information such as what frame is being rendered and how long the job is taking. When the entire animation has been rendered, you can go to your output directory to get the bitmap files that Max generated. The render servers and the render manager keep running, ready for the next job request to come in.
The Network Job Assignment dialog box, shown previously in Figure 48.7, has an important section that you didn—t use for your first simple render job; it—s called Options.
The Options section has the following settings:
You can configure both the manager and servers using their respective General Properties dialog boxes. You open these dialog boxes by choosing Edit General Settings.
The rendering manager has some options that let you modify how it behaves. You specify these options in the Network Manager General Properties dialog box, shown in Figure 48.11. To open this dialog box, select Edit General Settings in the Manager window.
This dialog box includes the following sections:
Note
The network manager can automatically attempt to restart servers that failed, giving your rendering farm much more stability.
Note
The rendering manager writes the configuration settings to a file on the disk that gets read when the manager loads. If you make changes to any of the settings, shutting down the manager and starting it up again to guarantee that the changes take effect is best.
As you may have guessed, the Properties button on the Network Server window serves a similar purpose as the one on the Network Manager window: It enables you to specify the behavior of the network server. Clicking this button displays the Backburner Server General Properties dialog box.
This dialog box has the following section:
Note
The Manager Name or IP Address setting lets you override automatic detection of the rendering manager and specify its exact location on the network. Generally, letting Max attempt to find the manager itself is best; if it fails, override the automatic detection by clearing the Automatic check box. If you happen to be running multiple managers on the same network, the servers connect to the first one they find. In this case, you have to manually choose the correct server.
Keep in mind that the server properties aren—t shared among your servers, so if you want something to change on all your servers, you have to make that change on each machine.
Note
As with the rendering manager settings, if you change anything in the Network Servers Properties dialog box, be sure to shut down the server and restart it.
Both the Network Manager and Network Server windows have a Logging button that you can click to access the Logging Properties dialog box, where you can configure how log information gets handled. This dialog box, shown in Figure 48.12, looks the same for managers and servers. You can access this dialog box with the Edit Log Settings command.
Max generates the following types of messages:
Max displays the type of message and the message itself in two locations: in the list window and in a log file (in your 3dsmax etwork directory). The Logging Properties dialog box lets you choose whether each type of message gets reported to the screen, the log file, both places, or neither place. You can also use the Clear buttons to get rid of old messages.
The Monitor is a powerful utility that helps you manage your rendering farm and all the jobs in it. If you use network rendering frequently, then the Monitor quickly becomes your best friend. You start it the same way that you start a rendering server or manager: Go to the 3dsmax directory, find QueueManager.exe, and double-click it. Every computer that has Max installed on it also has a copy of the Monitor, so you can use it from any machine on your network. The main screen is shown in Figure 48.13.
When the Monitor starts up, it automatically searches for the rendering manager and connects to it. (If you have more than one manager running, you have to choose which one to connect to.)
The main screen is divided into three panes. The top-left pane shows the job queue and their Priority and Status, and the top-right pane shows information about whatever you have selected in the left pane. You can use the tabs at the top of this pane to select the information that you want to view. The information tabs include Job Summary, Frames Summary, Advanced (which shows the rendering parameters), Render Elements, and Log.
The bottom pane lists all the available servers. Next to each server in the left pane is an icon that reflects its current status. Green icons mean that the job or server is active and hard at work. Yellow means the server is idle. Red means that something has gone wrong, and gray means that a job has been inactivated or that a server is assigned to a job but is absent. When a job is complete, it can be deleted from the queue.
If you choose a job in the top-left pane, the top-right pane displays information about the selected job. The panels in the top-right pane are as follows:
When you point at a job in the top-left pane and right-click, a small pop-up menu appears. On this menu, you can delete a job from the queue or you can choose to activate or deactivate it. If you deactivate a job, all the servers working on that job save their work in progress to disk and then move on to the next job in the queue. This feature is very useful when you have a lower-priority job that you run when no other jobs are waiting; when something more important comes along, you deactivate the job so that you can later activate it when the servers are free again.
One last useful feature for jobs is that you can reorder them by dragging a job above or below other jobs. Jobs higher on the screen are rendered before lower ones, which enables you to “bump up” the priority of a particular job without having to deactivate other ones.
Note
A file with a Critical priority is rendered immediately.
If you right-click a server and select Properties from the pop-up menu, the Server Properties dialog box, shown in Figure 48.14, opens. This dialog box contains information about the selected server.
Many other features are available in the right-click pop-up menu. Using this pop-up menu, you can assign the server to a selected job, remove the server from its selected job, display specific server information, create a server group, or view the Week Schedule, as shown in Figure 48.15. Using the Week Schedule dialog box, you can set the active rendering period for a server.
The Week Schedule dialog box lets you decide when a particular machine is available for rendering. (For example, you can have your coworker—s computer automatically become available for rendering after he or she goes home for the night.)
Click and drag with your mouse over different hours to select a group of times. Alternatively, you can click a day of the week to select the entire day or click a time to select that time for every day. In the example shown in Figure 48.15, the server is scheduled to render in the evenings and on the weekends.
After you—ve selected a group of times, click Allow to make the server available for rendering during that time or click Disallow to prevent rendering. When you—re finished, click OK to close the Server Properties dialog box and return to the Monitor dialog box.
If you have several jobs going at once but suddenly need to get one finished quickly, you can take servers off one job and put them on another. To remove a server, right-click its name in the left pane of the Monitor dialog box and choose Delete Server (Ctrl+Enter) from the pop-up menu. The icon next to the server turns black, indicating that it has been unassigned. To assign this server to another job, right-click the server name in the list of servers for the job you want to assign it to, and choose Assign to Selected Jobs.
If your goal is to spend more time modeling and less time waiting for rendering jobs to complete, then the network rendering services provided by 3ds Max can help you take a step in the right direction. After the initial complexities of setting up a rendering farm are out of the way, network rendering can be a great asset in helping you reach important deadlines, and it lets you enjoy your finished work sooner. Even if you can afford to add only one or two computers to your current setup, you—ll see a tremendous increase in productivity—an increase that you can—t truly appreciate until you—ve completed a job in a fraction of the time it used to take!
In this chapter, you accomplished the following:
3.136.22.179