Adverti horiz upsell
Batch Tool for rendering and file processing
Batch Tool for rendering and file processing
honglou, added 2008-12-07 13:44:07 UTC 18,950 views  Rating:
(6 ratings)
Page 1 of 1

Batch Tool Tutorial
I. What is the Batch Tool?
The Batch Tool is a tool kit to do Maya rendering and batch processing for large amount of files. It
serves as a bridge between Maya, operating system and local area network.
The Batch Tool allows you to:
*)Do Maya network rendering.
*)Do batch processing on Maya files, such as the absolute and relative path conversion for file
texture.
*)Do batch processing on operating system files, such as the format and resolution conversion for image files.
*)Do batch processing on local area network files.

II. How to install and run the Batch Tool?
BatchTool.rar can de downlaod from:/f/5519.html
Both the English and the Chinese version tutorial files can be found in the BatchTool.rar archive.
*)Windows system
Unzip the BathTool.rar and directly run BatchTool.exe and NetRenderServer.exe in the BIN
directory.
*)Linux system
Pthon and its Tkinter module are required for the Batch Tool installation.
Unzip the BathTool.rar and run the following on the terminal:
cd /yourFolderFullPath/BatchTool/bin
python NetRenderServer.pyc
python BatchTool.pyc

III. How to configure the Batch Tool?
The configuration file can be found in /BatchTool/etc folder. batchTool_Nt.env is for the Windows system and batchTool_Linux.env is for the Linux system.
Below is the example for the Windows system.
1. Open batchTool_Nt.env by notepad
2. Find MayaLocNt=C:/Progra~1/Autodesk/Maya2008 then change the Maya path to user's
machine corresponding Maya installation directory.
Note: The directory contained spaces (eg. "Program files" ) should to changed to "~1" or "~2"
(eg. Progra~1) based on users system environment. And most probably the "Program files (x86) " should be revised to" Progra~2 ".
3. Find host=192.168.1.155:NFS,192.168.1.169:NFS,192.168.1.77:UNC,192.168.1.69:UNC then change the IP to the user's local area network IP.
192.168.1.155:NFS stands for 192.168.1.155 in the Linux system and 192.168.1.77:UNC stands for 192.168.1.77 in the Windows system. The Batch Tool can be used in Windows and Linux at the same time comparably.
4. Find NFS=/mnt/data/maya2008x64, /mnt/data/production, /mnt/data/production2
UNC=c:/Progra~1/Autodesk/Maya2008, Y:, Z: then change the paths to users Maya
installation and the Maya working project paths.
Note: /mnt/data/maya2008x64 in NFS line and c:/Progra~1/Autodesk/Maya2008 in UNC line are the Maya installation path. /mnt/data/production, /mnt/data/production2 in NFS line and Y:, Z: in UNC line are the Maya working project paths.

IV. How to use the Batch Tool?
Tutorial I Network rendering by the Batch Tool
1. Run /yourFolder/BatchTool/bin/NetRenderServer.exe in the rendering machine. The following will be shown if processing successfully.
click for larger version
2. Run /yourFolder/BatchTool/bin/BatchTool.exe in the rendering controller machine.
click for larger version
3. Click File menu and run Open File, then select the needed Maya files in the popup dialog box. All the chosen files will be shown in the File List.
click for larger version
4. Click Render Farm menu and run Net Render, then configure the frame count for each rendering machine, select the rendering machines in the Host List and click Net Render button.

Note: The default settings for Start Frame, End Frame and by Frame are Null, which follow the Maya file settings. Null is the valid value for the Batch Tool.
5. The following message will be shown on the rendering machines if the renderings are successfully implemented.
click for larger version

Tutorial II Batch processing on the Maya files by the Batch Tool
To do batch processing on many Maya files.
1. Run the Batch Tool.
2. Click File menu and run Open File, then select the needed Maya files (one or more). Or
Click File and Open Directory, then select the needed Maya directory so that all the .ma and the .mb files (including the subdirectories) can be chosen at the same time.
3. Key in print Hello BatchTool in the Maya Command List.
Note: Maya Command List is similar to the mel tab of script editor in Maya. Users can key in all the command statements in script editor.
4. Click Py menu and run mb2ma, the following statement will be added to Maya Command List.
python("import sys");
python("sys.path.append(\\"/mnt/data/production/ASP_RnD/tools/tools/BatchTool/command/maya/py\\")");
python("import mb2ma");
python("mb2ma.mb2ma()");
click for larger version
Note: Py menu is a dramatic one. The command items can be shown in the menu if Python scripts are in the BatchTool/command/maya/py directory. Users can also call other Python scripts in other directories by Py> Source py command and make the corresponding modification on this calling.
python("import mb2ma");
python("mb2ma.mb2ma()");
5. Click Start Batch button to start the batch processing.
6. Or Click Save Batch File button to save a file for the later processing. The file name and
directory can be specified in the popup dialog box. Please use .bat as the file extension for
the windows system.

Tutorial III Batch processing on the Maya files by the Batch Tool
To auto generate a batch executable file to render lots of Maya files.
1. Run the Batch Tool.
2. Click File menu and run Open File, then select the needed Maya files (1 or more). Or
Click File and Open Directory, then select the needed Maya directory.
3. Click Mel menu and run Batch Render. Then BatchRender will be added to Maya
Command List.
Note: Mel menu is a dramatic one. The command items can be shown in the menu if Mel scripts are in the BatchTool/command/maya/mel directory. Batch Render is the builtin command of the Batch Tool.
4. Click Start Batch button to start the batch processing.
5. Or Click Save Batch File button to save a file for the later processing. The file name and
directory can be specified in the popup dialog box. Please use .bat as the file extension for
the windows system.

Tutorial IV Batch processing on the system files by the Batch Tool
To convert the pixel to 512*512 for many .tga files.
1. Run the Batch Tool.
2. Click Edit menu and run Preferences, then modify ['.ma','.mb'] to ['.tga'] in the openDirectoryInitialExt: item and click Save Preferences To File button.
click for larger version
3. Click File menu and run Open File, then change the Files of type: setting All files(*) to
choose one or more file. Or Click File menu and run Open Directory so that all .tga files can be
chosen at the same time by the setting of former step.
click for larger version
4. Click Python menu and run imageResize, the following statement will be added to System
Command List:.
python "/ASP_RnD/tools/tools/BatchTool/command/system/imageResize.py" $f
Note: The statement should be changed to the following for the Windows users without python in the system environment variable path.
C:/Python25/python "/ASP_RnD/tools/tools/BatchTool/command/system/imageResize.py" $f
And C:/Python25/ directory stands for the python installation path.
5. Click Start Batch button to start the batch processing.
Note: The system environment variable path must contain the bin directory of maya as the scripts call the imconvert file in the bin directory of maya during the image resizing batch processing.