As you are probably aware, 3ds Max 2021 and higher offer a streamlined Bake To Texture implementation with a clean API and scripting exposure.
The 3ds Max Integrated Submitter (Submit Max To Deadline, aka SMTD) shipping with Deadline currently only supports the old Render To Texture feature via a dedicated Workflow. The old implementation had several limitations, including single baked images being saved with a frame padding, and the UI requiring you to select the objects to bake.
The attached prototype of a Bake To Texture SMTD Workflow implements the new feature set and removes most of the limitations of the Render To Texture system.
If you use the new Bake To Texture feature in 3ds Max 2021 and higher, and would like to expand it to a Deadline render farm, please give this one a try. Once we have collected enough feedback and confidence that it works properly in the Real World, we might include it in a future build of Deadline.
The script was developed using 3ds Max 2021.3. Some features might operate differently in earlier product updates. The Workflow will not be visible in 3ds Max 2020 and earlier versions. Once 3ds Max 2022 support appears in Deadline, we will work to ensure it behaves properly there, too.
MAXScriptJob_BakeToTexture2021plus.zip (6.9 KB)
To install and access,
- Unzip the content of the archive into your DeadlineRepository10\submission\3dsmax\Main folder.
- Restart the Submit To Deadline (SMTD) script.
- Select “Submit BAKE TO TEXTURE (3ds Max 2021+) Job To Deadline” from the Workflow list.
User Interface:
To use,
- Click the “OPEN the Bake To Texture Dialog…” button.
- Configure Bake To Texture maps as usual.
- Press the “UPDATE From Bake To Texture Dialog” button to refresh the summary info and enable the SUBMIT button.
- Select the Bake Mode - this is the major improvement over the old Render to Texture Workflow which always added padding to the baked image:
- ONE MAP PER TASK - If baking a Single Frame, use FRAME 0, NO Padding - in this mode, the Job will contain as many Tasks as there are active Maps in the dialog. If the Render Setup dialog is set to Current Time, each Task will bake a Map at time 0, and the image will have no 0000 frame number padding. If the Render Setup dialog is set to any frame range, each Task will render multiple images with padding as usual.
- ONE MAP PER TASK - If baking a Single Frame, use PADDED Frame 0000 - Same as above, but if the Render Setup dialog is set to Current Time, each Task will bake a Map at time 0, and the image will have 0000 frame number padding. If the Render Setup dialog is set to any frame range, each Task will render multiple images with padding as usual. These two modes let you bake in parallel on multiple render nodes.
- ALL MAPS IN ONE TASK - If Baking a Single Frame, use Current Time, NO Padding - In this mode, a Job with a single Task will be submitted, and the Task Frame will be set to the current scene time. The Task will loop through all Maps and render all of them using the Render Setup dialog settings. If a single frame is requested, then the Task’s Frame time will be respected, and the image will have no frame number padding. The main benefit of this mode is the ability to render a specific single frame without padding.
- ALL MAPS IN ONE TASK - If Baking a Single Frame, use PADDED Current Time - Exactly the same as the previous mode, except baking a single image per Map will have the correct frame number padding. These last two modes use a single render node for all maps, so there is less overhead between maps, and processing a large number of very fast bake renders would take less time. You can render a single frame with padding using Render Range with Start and End set to the same value, or using Pickup Frames, so you can employ any of the 4 modes for that.
- Click the SUBMIT button.
Some confirmation dialogs will pop up:
- If the render output path is set to a local drive, a warning will be displayed.
- An overview of the submission settings will be shown and requires a confirmation:
The script will apply path mapping to the output folder specified in the Bake To Texture dialog, so it should respect Deadline’s Mapped Paths rules, and work with AWS Portal (however it has not been tested yet).
An idea for possible future improvement would be to add an option to run a local or farm-based Bake To Texture process with tiny resolution stand-ins to process any Material/Map creation and set up the scene with baked images, then process the full resolution baking in the render job to overwrite the stand-ins.
Please use this thread to post bug reports and ideas for improvement. If it just works for you, be sure to report that too so we can collect both positive and negative feedback.