πŸ† MaxPkg Developer Contest! Upload your scripts and compete for cash prizes: πŸ₯‡ $100 Β· πŸ₯ˆ $50 Β· πŸ₯‰ $25. Join the contest and publish your package today!Join the contest

Batch Overnight Render

by Β Β  Β  Nithish Kumar

Renders multiple cameras (or multiple scene files) in a loop overnight, writing beauty + render-element PNGs to an organized folder structure.

0 reviews
β€”
downloads
10
3ds Max
2022–2027
latest version
v1.0.0
license
Free
Render batch automation render overnight auto render batch render
Install

Opens the install steps and the download. You can also drag this button into the 3ds Max viewport.

Save to Favorites
Screenshots

Purpose

Renders multiple cameras or scene files in a loop overnight. Beauty renders and render elements are saved as PNGs in an organized folder structure.

Workflow

  1. The rlBatch dialog lists the scene’s cameras in a CheckedListBox.
  2. Select which cameras to render and choose an output folder. You can also open Render Settings.
  3. By default, the dialog checks cameras in the current selection. If nothing is selected, it checks all non-hidden cameras.
  4. Choose Start to render the selected cameras in sequence.

Key features

Stop or cancel a batch

Press Esc while 3ds Max or the V-Ray VFB is focused to cancel the current render and stop the batch.

As a fallback, create an empty STOP.txt file in the output folder.

Renderer and PNG settings

  • Optionally force V-Ray rendering.
  • Choose CPU or GPU rendering with cfg_useVRayGPU.
  • Select 48-bit or 24-bit PNG output.
  • Enable or disable alpha.
  • Set an override resolution. The default is 3840 Γ— 2160.

Render elements

Choose one of three methods:

  • #max β€” Uses 3ds Max element paths and switches the V-Ray VFB off.
  • #vfb β€” Uses V-Ray’s Separate render channels option.
  • #manual β€” Keeps the V-Ray VFB on so you can set the path yourself.

Resume and animation

  • Resume: cfg_skipExisting skips cameras whose beauty PNG already exists.
  • Animation: cfg_animation renders a frame range instead of a single frame.

Folder mode

When cfg_sceneFolder is set, the script batches every .max file in the chosen folder. Recursive processing is optional, and autoback files are ignored.

Beauty correction

When using the VFB render-element method, the main beauty image is re-saved from the V-Ray VFB. This bakes display and ACES corrections into the output.

Diagnostics

The script logs V-Ray output state and the render-element list once. It also records every file written for each camera, making missing passes easier to identify.

Shutdown

An optional shutdown command can run after a successful batch: shutdown /s /t N.

Shutdown does not run after a manual stop.

Implementation notes

  • escapeEnable = true is set at the top of the script so Esc can interrupt it.
  • setQuietMode true is enabled during the run to prevent dialogs from blocking the batch.
  • A temporary 10 Γ— 10 seed bitmap is saved to disk and assigned to output_splitbitmap. V-Ray’s split-channel writer needs a real, saved bitmap object to initialize.
  • freeSceneBitmaps() and gc light:true run after each camera to help prevent memory buildup during long render batches.