3ds Max - Integrated Submitter - Sanity Check

Overview

The 3ds Max Sanity Check script is part of the “Submit Max To Deadline” (SMTD) integrated submitter.

It defines a set of functions to be called to ensure that the scene submission does not contain typical errors like wrong render view and frame range settings, incorrect output path, etc.

  • The Sanity Check is enabled by the Run Sanity Check Automatically Before Submission checkbox in the bottom part of the SMTD UI.
  • You can also run the Sanity Check manually by clicking the Run Sanity Check Now! button located next to the checkbox.
../_images/sanity_checker.png

The dialog contains the following elements:

  • The upper area (Error Report) lists the problems found in the current scene.
  • The lower area (Feedback Messages) lists the actions the Sanity Check performs and gives feedback to the user. The latest message is always on top.
  • Between the two areas, there is a summary text line listing the total number of errors and a color indicator of the current Sanity Check state. When red, the Sanity Check will not allow a job submission to be performed.

The Error Report

The left column of the Error Report displays a checkbox and the type of the error. The checkbox determines whether the error will be taken into account by the final result of the check. Currently, there are 3 types of errors:

  • FATAL: The error cannot be fixed automatically and requires manual changes to the scene itself. A job submission with such an error would be pointless. The state of the checkbox is ignored and considered always checked.
  • Can Be Fixed: The error can be fixed automatically or manually. If the checkbox is active, the error contributes to the final result. If unchecked, the error is ignored and handled as a warning.
  • Warning: The problem might not require fixing, but could be of importance to the user. It is not taken into account by the final result (the state of the checkbox is ignored and considered always unchecked).

Repairing Errors

Right-clicking an Error Message in the Error Report window will cause an associated repair function to be executed and/or a Report Message to be output in the Feedback Messages window.

Updating the Error Report

You can re-run/update the Sanity Check in one of the following ways:

  • Clicking the dialog anywhere outside of the two message areas will rerun the Sanity Check and update all messages.
  • Double-clicking any Message in the Feedback Messages window will rerun the Sanity Check and update all messages.
  • Repairing an error by double-clicking will also automatically rerun the Sanity Check
  • Pressing the Run Now! button in the Submit To Deadline dialog will update the Sanity Check.

FATAL Sanity Checks

These are errors that must be fixed manually before the job can be submitted.

Message Description Fix
The scene does not contain ANY objects! The scene is empty and should not be sent to Deadline. Load a valid scene or create/ merge objects, then try again.
Maxwell is the renderer and the current view is NOT a Camera. Maxwell renderer must render through an actual camera and will fail through a viewport. Double-click the error message to open a Select By Name dialog to pick a camera for the current viewport.
The scene contains objects or groups with the same name as a camera! The scene contains objects or groups with a duplicate name to a camera which could result in an incorrect object being used as the camera. Ensure you remove any duplicate named objects from your scene.
Maxwell is the renderer and the Render Time Output is set to a SINGLE FRAME! (Check is currently disabled in SMTD) Maxwell has an issue with single frame rendering. Double-click the error message will change the Rendering Output Time to animation with just the current frame.
Render Output Path length exceeds 255 characters! Ensure the render output file save path is less than 255 characters in length. Double-click the error message will open the Render Scene Dialog for you to manually shorten the path length.
Render Elements Output Path length exceeds 255 characters! Ensure any Render Element file save path lengths are less than 255 characters in length. Double-click the error message will open the Render Scene Dialog for you to manually shorten the RE path length.
Duplicate Render Elements saving to same File Found! 1 or more Render Elements are saving to an identical file path and file name. Double-click the error message will open the Render Scene Dialog for you to manually resolve the duplication.
Scene Object(s) contain names > 255 characters! 1 or more objects in the scene has an object name which is greater than 255 characters in length, which will crash Max. Shorten the character length of all the objects in your scene to ensure stability.
Corrupt Group(s) detected in your Scene! One or more objects in your scene are a group head but have no child members! Double-click the error message to automatically have these corrupt nodes deleted from the scene. Results are printed to the Sanity Check Window.
Multi-Region Rendering Requested, But No Active Regions Found! Jigsaw Multi-Region Rendering has been enabled, but there are NO active regions enabled in the SMTD Tiles Tab UI. Ensure at least 1 region is active in the Jigsaw Multi- Region Rendering UI in the Tiles tab of SMTD.
V-Ray Save Raw Image File is Enabled, but Raw Image File Path is Empty! V-Ray VFB Save Raw Image File is enabled but NO save file path has been declared! Double-click the error message will open the Render Scene Dialog for you to manually enter a valid file save path.
V-Ray Save Separate Render Channels is Enabled, but Separate Render Channels File Path is Empty! V-Ray VFB Save Separate Render Channels is Enabled, but NO save file path has been declared! Double-click the error message will open the Render Scene Dialog for you to manually enter a valid file save path.
V-Ray VFB - [Region render] button should be Disabled! V-Ray VFB [Region render] must be disabled for network rendering. Double-click the error message will disable the [Region render] button in the VFB.
V-Ray VFB - [Track mouse while rendering] button should be Disabled! V-Ray VFB [Track mouse while rendering] button must be disabled for network rendering. Double-click the error message will disable the [Track mouse while rendering] button in the VFB.
V-Ray RE:[Alpha,Reflection, Refraction] or [Save alpha] requires Draft Tile Assembler. NOT supported with TA. When using Jigsaw SingleFrame Tile Rendering with V-Ray RE’s such as Alpha, Reflection, Refraction OR [Save alpha] via the VFB, ensure you use Draft Tile Assembler which is able to support the higher bit depths created by these RE’s. Double-click the error message will enable Draft as the Tile Assembler.
V-Ray VFB - Render Region is outside the bounds of the current render resolution! V-Ray VFB [Region Render] size is currently beyond the coords of the current render resolution. Double-click the error message will disable the [Region render] button in the VFB.
V-Ray - AA Render mask selection is currently invalid, which will cause the render to hang! V-Ray Image Sampler (AA) ‘Render mask’ selection is currently empty or invalid which will cause the render to hang once submitted. Ensure a valid ‘Render mask’ selection is used prior to submitting the job to Deadline.
‘Select GPU Devices’ syntax is invalid! Trailing ‘commas’ if present, should be removed. Trailing ‘commas’ should be removed. Valid Examples: 0 or 2 or 0,1,2 or 0,3,4 etc. Ensure GPU syntax is valid as entered in the ‘Select GPU Devices’ text field.
If using ‘Select GPU Devices’, then ‘Concurrent Tasks’ must be set to 1! Due to Task to GPU device ID mapping, ensure Concurrent Tasks is set to 1 if using ‘Select GPU Devices’ option. Double-click the error message to set Concurrent Tasks to 1.
At least one camera name has whitespace, newline, or tab at start/end of camera name. One or more cameras in the scene have ‘bad’ characters at the start or end of the camera name which will cause the camera to be ‘undefined’ at render time. Double-click the error message to trim any bad characters from each identified camera.

Can Be Fixed Sanity Checks

The following Sanity Checks can be fixed automatically by right-clicking the message before the job is submitted.

You can also ignore each message without fixing the cause for the issue by unchecking the checkbox in front of it. This is useful in cases where the Sanity Check is too conservative and reporting a setting that is intentional (e.g. single frame rendering).

Message Description Fix
The current Scene Name is Untitled.

The scene has never been saved to a MAX file.

While it is possible to submit an untitled scene to Deadline, it is not a good practice.

Double-click the error message to open a Save As dialog and save to disk.
The current view is NOT a camera. The active viewport is not a camera viewport. Double-click the error message to open a Select By Name dialog to pick a camera for the current viewport.
The Render Time Output is set to SINGLE FRAME! While it is ok to send a single frame to Deadline, users are sending animations 99% of the cases. Double-click the error message to set the Render Time Output to “Active Time Segment:. The Render Dialog will open so you can check the options and set to Range or Frames instead.
The Render Output Path appears to point at a LOCAL DRIVE! While it is technically possible to save locally on each Worker, this is a bad idea - all Workers should write their output to a central location on the network. Currently, disks C:, D: and E: are considered local and will be tested against the output path.

Double-click the error message to open the Render Dialog and

select a valid path, then double-click again to retest.

The Render Output File Name ends with a DIGIT - trailing numbers might fail. The Name to be saved to ends with one, two or three digits. Rendering to this file name will append 4 more digits and make loading sequential files in other applications hard or impossible. This check is performed only when the type is not AVI or MOV and will ignore 4 trailing digits which will be replaced by 3dsmax correctly when rendering to sequential files. Double-click the error message to add an underscore _ to the end of the file name, for example z:\temp\test123.tga will be changed to z:\temp\test123_.tga
The Render Output will not be saved to a file. No renders will be saved as Render Scene Dialog checkbox is currently disabled. Double-click the error message to open the Render Dialog and to enable the Save File checkbox.
The Distributed Rendering option is enabled for this renderer. Check if Distributed Rendering is enabled for MR or V-Ray renderer. Double-click the error message to disable Distributed rendering.
Workstation Mode must be enabled to use V-Ray Distributed Rendering (via 3dsmax plugin). 3dsMax must use a workstation license to allow Distributed Rendering to work, when it is being offloaded onto the farm. Double-click the error message and Workstation Mode will be enabled in SMTD.
The Render Time Output is NOT set to single frame, and Remove Filename Padding is enabled! When rendering animations, you should allow filename padding to ensure an image sequence is created during rendering. Double-click the error message will change the Rendering Output Time to SINGLE FRAME.
The current Renderer is Krakatoa and Particle Cache is ON! Particle and Lighting Cache should be disabled during SMTD submission to Deadline queue. Double-click the error message to set the PCache & LCache to be disabled.
One or more Render Element Save File Paths are EMPTY! (V-Ray? - Disable the Individual RE) Ensure that a Render Element Output File has been selected for each Render Element! If using V-Ray Frame Buffer and ALL RE’s have been Disabled, then IGNORE this Sanity Check! Double-click the error message will open the Render Scene Dialog for you to manually resolve the issue or it can be safely ignored.
Camera Match Background Image(s) in your Scene. Right-click to REMOVE these ref. bitmaps! Surplus camera match bkgrd images in your scene cause unnecessary bitmap refs. in your scene file. Double-click the error message will delete any background image in ALL cameras in your scene file.
Alpha Channel will NOT be stored if saving *.tga file @ 16/24bit depth! Select 32bit for Alpha! Ensure you select 32bit in the TGA image plugin file format options to ensure an alpha channel is stored in the TGA file. Double-click the error message will open the Render Scene Dialog for you to manually configure the bit depth of the TGA image file to be saved.
V-Ray IMAP File (*.vrmap) set to ‘From File’ is missing / invalid file path! V-Ray GI tab, IMAP File is either missing or set to an invalid file path. Double-click the error message will open the Render Scene Dialog for you to manually enter a valid file save path.
V-Ray Photon File (*.vrpmap) set to ‘From File’ is missing / invalid file path! V-Ray GI tab, Photon File is either missing or set to an invalid file path. Double-click the error message will open the Render Scene Dialog for you to manually enter a valid file save path.
V-Ray LC File (*.vrlmap) set to ‘From File’ is missing / invalid file path! V-Ray GI tab, LC File is either missing or set to an invalid file path. Double-click the error message will open the Render Scene Dialog for you to manually enter a valid file save path.
V-Ray Caustics File (*.vrpmap) set to ‘From File’ is missing / invalid file path! V-Ray GI tab, Caustics File is either missing or set to an invalid file path. Double-click the error message will open the Render Scene Dialog for you to manually enter a valid file save path.
Current Scene is Rendering in Active Shade Mode. Are you sure you want to Submit? Render Scene Dialog is set to Active Shade Mode currently, which is unsupported. Double-click the error message will set #Production renderer as the current scene renderer.
FumeFX Sim Job? - Disable Progress Timeout MUST be ENABLED! FumeFX node(s) are configured to simulate in this job, so Deadline’s Progress Update Timeout should be disabled. Double-click the error message will check the ‘Disable Progress Update Timeout’ checkbox in ‘Render’ tab.
FumeFX - Sim Jobs ONLY need to be a SINGLE FRAME (ALL Frames will be Simulated) FumeFX node(s) are configured to simulate in this job, so 3ds Max Render Time should be set to SINGLE FRAME only. Double-click the error message will automatically change the current Render Time Output to Single Frame.
FumeFX - Sim Jobs MUST have a MACHINE LIMIT = 1 (RUN only on 1 machine) FumeFX node(s) are configured to simulate in this job, so Deadline’s Machine Limit must be set to 1 (run on 1 Worker). Double-click the error message will automatically change the SMTD Machine Limit to enabled and set to 1 Worker only.
V-Ray DBR off-load requires WORKSTATION mode to be ENABLED. [Use 3dsCmd Plugin] to avoid! Off-load V-Ray DBR requires a workstation license for the first task (MASTER machine). Avoid this by submitting to the 3dsCmd plugin instead. Double-click the error message will automatically enable the the [Use 3dsCmd Plugin] checkbox in SMTD -> render tab.
Render output file already has a delimiter in it! Main render output filename & path contains “..”. Possibly due to Delimiter set in Defaults ini file. Double-click the error message to remove the extra delimiter from render output filename.
V-Ray raw image file [DUPLICATE DOT] delimiter/user entered V-Ray RAW image filename has duplicate “..”. Possibly due to Delimiter set in Defaults ini file. Double-click the error message to remove the extra delimiter from V-Ray RAW image filename.
V-Ray raw image file [DUPLICATE DOT] fileName_addDot/user entered V-Ray RAW image filename has duplicate “..”. Possibly due to V-Ray’s own addDot option in RAW File Browser Dialog. Double-click the error message to remove the extra delimiter from V-Ray RAW image filename.
V-Ray separate render channel files already have a delimiter in them! V-Ray separate render channel filename has duplicate “..”. Possibly due to Delimiter set in Defaults ini file. Double-click the error message to remove the extra delimiter from V-Ray separate render channel image filename.
At least one render element output file already has a delimiter in it! One or more V-Ray Render Elements contain a duplicate “..” in their image filename. Double-click the error message to remove the extra delimiter from all V-Ray Render Element filenames.
Render Elements may overwrite each other as file paths may NOT be unique! Check! 1 or more Render Elements are destined to save to an identical file path and file name. Ensure at least one ‘Include’ RE checkbox option is enabled in SMTD -> Render -> 3ds Max Pathing.
Corona VFB - [Region render] button might need to be Disabled! Corona [Region render] might need to be disabled for the correct render to be produced? Double-click the error message will disable the [Region render] button in the VFB.

Warnings

The following Sanity Check messages are simply warnings which do not affect the ability to submit the job.

Message Description Fix
The Render Output Path is NOT DEFINED! No frames will be saved to disk. This is allowed if you want to output render elements only. Double-click the error message to open the Render Dialog and select a valid path, then double-click again to retest.
The Render Output is set to a MOVIE format.

The file extension is set to an AVI or MOV format.

In the current version of Deadline, this would result in a sequence of single frame MOV files rendered by separate Workers. In the future, the behaviour might be changed to render a single MOV or AVI file on a single Worker as one Task.

Double-click the error message to open the Render Dialog and select a single frame output format, then double-click again to retest.
Not rendering final image (GI) so Restart Renderer should be disabled, and Machine Limit set to 1. “Don’t render final image” is enabled, so Restart Renderer and Machine Limit should be set to 1 in SMTD. Double-click the error message and Restart Renderer will be disabled and Machine Limit enabled and set to 1 in SMTD.
Restart Renderer Between Frames is disabled and V-Ray or Brazil is the selected renderer. V-Ray & Brazil renderers need Restart Renderer to be enabled to ensure memory levels are purged during rendering. Double-click the error message to enable Restart Renderer in the SMTD settings.
Viewport is currently locked, which can result in incorrect renders with Deadline. The locked viewport setting in 3dsMax 2009-2014 is ignored in the SDK but is fixed in 3dsMax 2015 onwards. Double-click the error message to disable the Locked Viewport (padlock) in the Render Scene Dialog.
Tile Rendering is enabled and the V-Ray VFB is currently on. Unexpected results can occur when the V-Ray VFB is enabled and you are Tile Rendering. Consider where any Render Elements may be saving to, including the use of the VFB Split Channels and RAW output. Double-click the error message to disable the V-Ray VFB output checkbox.
V-Ray VFB Enabled - 3ds Max ‘Render Elements’ will NOT save. This may be as intended? No render elements will be saved if V-Ray’s VFB is enabled and the ‘Split render channels’ option is disabled. Double-click the error message to disable the V-Ray VFB output checkbox or ignore this message as this setup may be as you intended.

This list will be extended to include future checks and can be edited by 3rd parties by adding new definitions and functions to the original script. Please email suggestions for enhancements and additional test cases to Deadline Support.

Defining Private Sanity Checks

General vs. Private Checks

The Sanity Check consists of two sets of check and repair functions definitions - a General set, and a Private set.

  • The file SubmitMaxToDeadline_SanityCheck_General.ms located in the Repository’s submission3dsmaxMain subfolder contains the definitions of the General functions.
    • This file will be updated by the Deadline Repository installer when new versions of the software are installed on top of existing ones.
  • The file SubmitMaxToDeadline_SanityCheck_Private.ms located in the Repository’s submission3dsmaxMain subfolder contains the definitions of the Private functions.
    • This file will not be updated by the Deadline Repository installer when new versions of the software are installed on top of existing ones.
    • It will only be created if it does not exist yet (new installation, or it was deleted manually).
    • This means that any changes made to the Private definitions will be preserved between Deadline minor version updates.
    • When switching to a new major version, the existing Private definitions file will have to be copied over manually.
  • Upon launch, SMTD will merge the array of Private definitions with the array of General definitions, and the Sanity Check will process both as one set of rules.

The Sanity Check Definition Array

The Private Sanity Checks file looks like this when first installed:

-----------------------------------------------------------------------------------------------------------------------------------------------
--THIS FILE CONTAINS YOUR USER-DEFINED CHECKS TO BE PERFORMED AND THE FUNCTIONS
--TO BE USED TO CHECK AND REPAIR THE SCENE BEFORE SUBMISSION
-----------------------------------------------------------------------------------------------------------------------------------------------
--THIS FILE WILL **NOT** BE UPDATED AUTOMATICALLY BY THINKBOX SOFTWARE INC
--AND SHOULD BE USED FOR YOUR IN-HOUSE NEEDS.
-----------------------------------------------------------------------------------------------------------------------------------------------

(
global SMTD_Private_SanityCheckFunctions
global SMTD_Private_SanityChecksToPerform
global SMTD_Private_RepairFunctions

global SMTD_RepairFunctions
global SMTD_SanityChecksToPerform
global SMTD_SanityCheckFunctions

struct SMTD_Private_SanityCheckFunctions
(
    fn Blank =
    (
    )
)--end struct


struct SMTD_Private_RepairFunctions
(
    fn Blank =
    (
    )
)--end struct


------------------------------------------------------------------------------------------------------------------------------------------------------
--SANITY CHECK PRIVATE DEFINITIONS
------------------------------------------------------------------------------------------------------------------------------------------------------

SMTD_Private_SanityChecksToPerform = #(

)--end checks array

)--End File

The file contains

  • Some global variable definitions,
  • Two structs with blank place-holder functions, and
  • The global SMTD_Private_SanityChecksToPerform array containing no sub-arrays.

Adding A New Private Check

Let’s edit the file to add a new Private function to check whether the current renderer is set to render type “View”.

  • First, we will rename the “blank” function in the SMTD_Private_SanityCheckFunctions struct to “CheckRenderType”.
  • In the function’s body, we will compare the return value of getRenderType() with the name value #view, and will return True if they are equal, and False if they are not.
  • Next, we will rename the “bland” function in the SMTD_Private_RepairFunctions struct to “FixRenderType”.
  • In the function’s body, we will close the Render dialog, set the render type to #view, and open the Render dialog again.
  • Finally, in the global SMTD_Private_SanityChecksToPerform array, we will add a new sub-array containing
    • the new check function,
    • the check type #fix as it is a fixable issue,
    • the description of the issue
    • the repair function to execute if right-clicked,
    • and the boolean value of True which means the check is enabled by default.

The modified file would look like this:

-----------------------------------------------------------------------------------------------------------------------------------------------
--THIS FILE CONTAINS YOUR USER-DEFINED CHECKS TO BE PERFORMED AND THE FUNCTIONS
--TO BE USED TO CHECK AND REPAIR THE SCENE BEFORE SUBMISSION
-----------------------------------------------------------------------------------------------------------------------------------------------
--THIS FILE WILL **NOT** BE UPDATED AUTOMATICALLY BY THINKBOX SOFTWARE INC
--AND SHOULD BE USED FOR YOUR IN-HOUSE NEEDS.
-----------------------------------------------------------------------------------------------------------------------------------------------

(
global SMTD_Private_SanityCheckFunctions
global SMTD_Private_SanityChecksToPerform
global SMTD_Private_RepairFunctions

global SMTD_RepairFunctions
global SMTD_SanityChecksToPerform
global SMTD_SanityCheckFunctions

struct SMTD_Private_SanityCheckFunctions
(
    fn CheckRenderType =
    (
        getRenderType() == #view
    )
)--end struct


struct SMTD_Private_RepairFunctions
(
    fn FixRenderType =
    (
        renderSceneDialog.close()
        setRenderType #view
        renderSceneDialog.open()
    )
)--end struct


------------------------------------------------------------------------------------------------------------------------------------------------------
--SANITY CHECK PRIVATE DEFINITIONS
------------------------------------------------------------------------------------------------------------------------------------------------------

SMTD_Private_SanityChecksToPerform = #(
        #(SMTD_Private_SanityCheckFunctions.CheckRenderType, #fix, "The Area To Render is NOT set to VIEW!", SMTD_Private_RepairFunctions.FixRenderType, true)
)--end checks array

)--End File

After the file is saved and SMTD restarted, if you would set the Area To Render option in the Render Scene dialog to anything but “View”, the new Sanity Check will detect the issue and show up in the Error Report list.