Batch Camera Render

272 votes
Version: 
1.18
Date Updated: 
08/03/2022
Author Name: 
Sergo Pogosyan

This script aims to replace standard 3dsmax's Batch Render and imitates Houdini Output Node workflow. Using it you can specify rendering parameters - frame size, frame number, output path - directly to camera object, so every camera in scene 'knows' what it intended to render. Additional functionality is Lighting Assignment - you can specify which light will be turn on or off for selected camera during the rendering.

1.18:

  • Support for 3ds max 2023 Update fixed

1.17:

  • Corona and Vray Sun inside Daylight System fixed (thanks to busseynova for reporting)

1.16:

  • CoronaSun supported inside Daylight System

1.15:

  • Don't Save Render Elements Checkbox (Thanks to antomor)
  • Limited support for camera objects in xref scene files (Only root objects in first level xrefs. Cameras in nested xrefs not supported)

1.13 Bugfix:

  • Deadline submission should work now

1.12 New Feature:

  • Deadline support.
    Very basic imlementation, it allows you to submit your jobs on a deadline server. Enter deadline repository address and check "Use Deadline" checkbox. Other checkbox doesn't matter in this case ("Net render", "Show Submit Dialog").
    Probably it requires Deadline 3ds max Submitter installed. I didn't have a chance to check it on a clean machine.

1.11 Features and fixes:

  • State sets support added
  • "projectname" keyword added which resolves to project's folder name
  • other fixes and improvements

1.10.3b Fixes:

  • Crash when vray ir/lcache maps are set to auto-save
  • Region render was not set properly during the rendering

This is major update of the script, so it may not be as stable as before. Backup scenes or cameras at least before running this version. More information can be found here - 1.10b Multiple presets for each camera

Previous updates:

1.10.2b Fixes:

  • Problems with render elements paths
  • Copy/paste of render region settings
  • Properly convert render region values when change resolution

New features:

  • Multiple presets for each camera
  • New keyword %presetname% to support multiple presets
  • Distributed rendering checkbox added to vray common settings
  • Bugfix - Net render not starting after cancelling during local rendering.
  • Improved performance with scenes with lots of cameras
  • Added support of Vray RT as a production renderer
  • Added support of using MFRender script to render scenes through BatchCamera script.
  • Bugfix - Error was popping up sometimes during drag-n-drop
  • Bugfix - Render elements didn't render in certain conditions
  • Bugfix - Pre-render/post-render scripts didn't work on network rendering
  • Bugfix - Select All and Toggle All buttons didn't work properly

Here are some details: http://usakhelo.github.io/batchcam/batchcam-1.9.20.html

Script's website - http://usakhelo.github.io/batchcam/

Github - https://github.com/usakhelo/batchcam

2015 Updates

  • Region render parameter can be specified for each camera
  • Set Viewport button sets viewport camera and resolution and aspect as well
  • It is possible now to specify backburner servers and server groups for silent rendering submit (code editing required)
  • Vray Elements fixed for Vray 3 and Vray output saving with VFB color correction
  • Cancelling of rendering of multiple cameras at once,
  • Hierarchical ini files

2013 Updates

  • Drag-n-drop of cameras in list
  • Camera list window size can be changed (script restart required)
  • When committing region render it is possible to switch to view render without restarting the render
  • Keyword syntax can be used in Scene State names - thanks to Stefan Runevik for suggestion

2011 Updates

  • Preview button added - renders only current frame without saving anything - no images, no vray maps, no scripts running, no elements.
  • Ortho mode added to Vray rollout - it turns any camera to orthographic, including Vray Physical camera.
  • Copy/Paste from one camera to one/several cameras - use new buttons at the top of the window.
  • Submit Scripts section - you can assign script files that will run on each render submit. Per Submit script runs once per render submit and Per Camera script runs for each camera before submit. All these scripts run on local machine, not on render server.
  • Last Rendered Location field - here is stored last render file location. Very useful for locating last-time rendered images.
Additional Info: 

Installation:

Run this script with Maxscript -> Run Script command from any folder on your hard drive, then go to the *'Customize User Interface' -> 'Toolbars'*, browse to category 'Sergo Pogosyan' and add 'Render scene cameras...' button to the toolbar or to the menu.

Usage:

When you start this script it iterate over 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 lighting setup. All these properties can be changed for one or several selected cameras. Output file location is split to folder path and file name, so you can specify new folder for all selected cameras in scene. 'Lighting assignement' section contains three list: Solo light list contains lights that will be only lights turned on during the rendering, 'Forced On' and 'Forced Off' lights are turned on or off respectively during the rendering. After all these setting will be set up (if some properties is not set value from the Render Setup will be used), check the camera(s) in the list and hit Render button. Check Net Render checkbox to submit network render job.

Supported lights: All bundled 3ds max lights, all Vray Lights
Supported cameras: All bundled 3ds max cameras, Vray PhysicalCamera

Version Requirement: 
3ds max 2008-202x
AttachmentSize
batchcamerarender_1.17.ms245.88 KB
batchcamerarender_1.18.ms245.92 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sergo's picture

Custom keywords

Hi,

I would suggest trying Custom Keywords section in Options rollout. This is exactly what they have been done for. You simply put name of the keyword and next to it a maxscript string, to "calculate" value of the keyword. Then you use your keyword as standard keywords.

I'll post working example shortly if you can't figure it out.

arcadio's picture

add some Keywords

Hi.
First I want to thank you for perfect script. I appreciate your time spend with development.
Second I have an idea that with "keywords" in your script (for example %scenestate%) you can also use a vray "keywords"

for example if you use: D:\Work\%cameraname%_%rendertime%.jpg

it would be very useful, but I dont know if you have access to this variables, or if it isnt too time consuming to add that. Thanks again for prefect script.

e_samurai's picture

Is the crash happening with

Is the crash happening with an unhandled exception? Are you using scene states or render presets? I got the same issue and fixed it by correcting whatever goes wrong when the second camera loads (another render preset). Check out my comment above. Hopefully will help you!

e_samurai's picture

Great script! Minor problems (and how to fix)

Hi! Thanks for the incredibly useful script! Although I totally love it because it's the only free solution for what I'm doing, I've been struggling with it for the last 4 hours or so. Been debugging some issues that caused random Unhandled Exceptions and other rendering glitches. I'm working with 3Ds Max 2014, Vray 3.2 and Win7 Ultimate. Please note that I am very much a beginner in Maxscript so I tried as hard as I could. Here are my most important observations:

1- The script doesn't render sequences if the renderer in 3Ds max is set to "Iteration render" OR when it is set to render a single frame in the Common tab. Solution: For now, I just added this snippet as a global Pre-render script. That should save all the hassle of forgetting to switch those two options to the right setup

try ( renderSceneDialog.close() ) 
catch() 
macros.run "Render" "RenderButtonMenu_Switch_To_Production_Mode" 
rendTimeType = 2 

The try catch thing is because these changes will not be applied unless the dialog is closed.

 

2- For an extremely weird reason, when working with Vray Sky and a manual sun node, if you save this in a Render Preset or a Scene State the sun node will magically disappear from the sky map when the script loads the sequence (or even whenever the render preset is changed). I simply wrote a code to recreate the map or repair the node where possible. Before doing that, the script caused "Unhandled Exception" with Vray when I simply kept re-assigning the same map to the environment map.

P.S: The IR and LC modes don't work properly in most cases (PrePass - Rendering) for animation.

Other than that, it's GREAT! Sometimes things do disappear (checkboxes or paths) but the most incredibly useful feature is the %name% tags that saved my life today! Thanks again and keep up the great work!

gLab's picture

Net Render and Distributed Rendering

Hi Sergo,
thanks a lot for this useful script! We use it every day.
One suggestion though: We'd like to submit jobs to backburner with distributed rendering to only one computer. With 3ds max batch render you can do this easily as the submit dialogue appears only once and all the jobs are submitted to the selected computer. With your script the submit dialogue appears for every single job and you have to hit submit manually every time which can take too long for complex scenes with many cameras. So the question is if it's possible to have the submit dialogue open only once so you can select a node and all jobs will be submitted to this node.

Thanks and best regards,
g.

sergo's picture

standard batch render is faster?

Hi,

are you sure standard Batchrender does it faster? Isn't it sending whole scene for each of its presets?

marcwe's picture

sending to net render

hi, your script look great,
but just a suggestion,
Also the script can send to net render all the camera if you opt not to open the submit dialog,
through the original batch render, sending to net render do open the submit dialog, but only one time and you get automatically all the job added with job name updated automatically by sending it only one time. Also it does it very quickly compared to your helpful script who send separately each job.

sergo's picture

This is interesting... Could

This is interesting... Could you post versions of 3ds max and which renderer do you use? And what kind of settings do you have for cameras? Simple things like paths and resolutions or scenestates and render presets? Could you send me empty max file with cameras so I could check the settings?

jgodbey's picture

Crashes after rendering

First of all, thanks for the awesome script! It's been a big help. Has anyone ever had problems with Max crashing when starting to render another camera? It started for me after I upgraded to Windows 10. The script worked perfectly on Win 7. There doesn't seem to be a pattern to the crashes though. Sometimes it will go through 7-10 cameras ok before crashing and sometimes it will crash after rendering just one camera. I don't believe it's a memory issue since it worked ok when I was on Windows 7.

Any help is much appreciated!
Jason

*Update*
I did a test and it renders fine 100% of the time when I just select one camera and nothing else. If any other cameras are queued up, Max is prone to crash.

sergo's picture

To turn on/off render elements for presets

@nobo:
To turn on/off render elements for presets you can use this checkbox:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.