Current Version:
1.9.4.1
Release Date:
28 April 2010
This is a new description of the script. It will be updated everytime the new version comes out.
The Idea
Very first idea to write such script came to me when I started to learn Houdini. Houdini has node architecture, and for the rendering it uses output nodes. These nodes have properties to specify included/excluded lights and objects, so you can create several output nodes and specify camera/lighting/objects relationship for each node. It's a great feature and you can implement same relationship in 3dsmax using batch render command with "scene states" where you can specify lighting options and "render preset" where you can specify rendering properties.
So what the problem with batch render? It lacks two features - you can not specify nonsequential frames and you can not specify new output file location for several cameras at once. So I've started to write this tool to replace standard batch render
How it works.
When you start this script it collects all cameras in scene and list them in the dialog box. To each of these cameras you can assign frame resolution, number of frames to render including nonsequential frames, output file location and many other options. This infomation is saved with the AppData method to the each camera object. Assigned properties can be changed for one or several selected cameras.
Main Features
Here is the list of options that could be assigned to each camera.
Image resolution. Resolution could be selected from the listbox or entered in the width and height spinners. Next to these spinners are placed two buttons to quickly double or halve the resolution. There are also two buttons to get and set resolution from/to Render Setup window.
Output file location. This property is split to folder path and file name so file and folder could be changed separetaly for selected cameras. In this section there is the Render Element subfolder option. Relative or absolute path could be used for the Render Elements. All the file/path properties support keyword syntax that will be described later.
Frame Range. Among the standard frame number options here is the Anim.Range option. With this option script calculates animated range of the selected camera and uses that range in rendering.
Scene State and Render Preset. This section contains only two dropdown list with scene states and render presets to assign to camera.
Vray options. For the Vray renderer script contains some global options and some options that could be assigned to camera. Global options duplicates the standard Vray Global and FrameBuffer options. Per-camera options are the Irradiance and Lightcache map files.
Light Assigmenent. In this section lighting state of the scene could be assigned to the camera. Lighting state could be set up by the scene states, but this section gives slightly different control. Section contains three lists: 'Solo Light' list contains lights that will be the only lights turned on during the rendering, 'Forced On' and 'Forced Off' lights are turned on or off respectively during the rendering.
All sections contains Clear button to delete section properties.
Some Other Features and Usabitility
Keyword syntax is one of the strongest part of the script. Special keywords can be used in all file and folder paths to include camera name, scene state name, date, resolution, scene file name and project folder name in that paths.
Here is the list of currently supported keywords:
- %cameraname%
- %scenestate%
- %renderpreset%
- %resolution%
- %date%
- %scenename%
- %projectfolder%
Example usage:
path like that D:\Work\%projectname%\%date%\%cameraname%.jpg
produces D:\Work\SomeProject\2010-03-10\interior.jpg
All specified paths that don't exist at moment the rendering starts will be created autamatically. The "Create new paths silently" checkbox could be used to turn this feature on or off.
Network rendering is also automated - several netrender jobs can be sent with one click, bypassing Submit Network Job Assignement window.
Several buttons below the main camera list are given to make work with large list more comfortable.
All the properies are placed in several rollouts. Rollout state and window size and position is saving during the session. Upon the render starts checking is performed if render type is set to view - if render type set to region, blowup or something except view mode warning dialog box appears.
To save global properties across the 3dsmax sessions they are saved to BatchCameraRender.ini located in the %LOCALAPPDATA%/3dsmax/.../plugcfg/BatchCameraRender folder.
Macroscript is designed as standard dialog windows - toolbar button works as a switch, first click runs the script, the second closes the script.
Limitations and Warning
Some of the properties (if not all) doesn't pass very strict checking. For example if the Vray GI is turned off and in the script Irradiance Map map save file name is specified then the file wouldn't be saved.
I'm using this script every day and trying to make it stable but, anyway, it may contain some bugs. Use this script at your own risk.
Thanks
I would like to thank everyone who uses this script and helps me with suggestions and bugreports.




This script is just awesome! Any chance to have a dotnet version, for the x64 users? Or.. If you stick to activex... do you mind if we try to recreate your script in dotnet environment? Keep up the good work!
Andras