Submit Vrayframebuffer saving jobs but from Batch Render in 3dsmax


For now Deadline can’t submit Vray jobs saving from the Vray framebuffer (with all Vray channels ) but from Batch Render.
It would be VERY helpful being able to use Batcher with Vray fram buffer “V-Ray raw render image file” checkbox.

Right now I’m using a simple post-load script for doing this, but it has a few drawbacks.

The script:
vr.output_on = true
vr.output_saveRawFile = true
vr.output_rawFileName = rendOutputFilename
vfbControl #show
rendOutputFilename = “”
rendSaveFile = false

If forces 3dsmax to switch on the vray file saving using the same name as the file name used in the save frame 3dsmax default box.
But despite the script trying to switch off the default 3dsmax file saving (last 2 lines) it save the frame 2 times now, one from the VRay VFB (what I need with all render elements) and one from 3dsmax (only 3dsmax elements, no VR denoiser, no VR elements).

What is needed to implement this functionality (but without the double-save) into SMTD?
Best with a chckbox placed inside the “Misc.” Tab in SMTD?


I did some prototyping here, in my version of in the function fn spawnBatchJobsLocal around line 10474.


					--Set New Output File
					if theView.outputFilename != "" do rendOutputFileName = theView.outputFilename --get path from Batch Render Dialog, if specified
					rendSaveFile = true
					--Handle V-Ray RAW Output Renaming
					local theRenderer = SMTDFunctions.getRendererObject()
					if (SMTDFunctions.getRendererIdString() == "vray" OR SMTDFunctions.getRendererIdString() == "vrayrt") AND theRenderer.output_on do
						if (theRenderer.output_saveRawFile AND theRenderer.output_rawFileName != undefined AND theRenderer.output_rawFileName != "") then
							theRenderer.output_rawFileName = getFilenamePath rendOutputFileName + getFileNameFile rendOutputFileName + ".vrimg"
							rendSaveFile = false
					--Set Alternative Resolution and Pixel Aspect if Override Preset is on
					--Set Alternative Frame Range is Override Preset is on
					if theView.overridePreset then

Assuming you are submitting the Batch jobs from the local workstation, and the V-Ray Frame Buffer is on and a RAW file is already specified, this code will set the render output file name in the RAW buffer field instead of the regular render output. It will also automatically disable the render output saving of the Render Scene dialog (I don’t see a reason to ever save the regular output if a vrimg is being saved, but if you feel a checkbox would be needed to decide this, we could add one).

Similar code would have to be added to the second batch submission function fn spawnBatchJobs which performs the submission from a Slave.


First of all: I’m really impressed by the speed of your answer, thanks a lot.

Setting the Vray VFB outside the monitors would be very practical if it would work, but it don’t in a post-load script also disabling the normal render output don’t work (as you say there is no need for 3dsmax saving it’s own files)
Creatin a prerender frame script could work:

callbacks.addScript #preRenderFrame "vfbControl #pos 100 -5000" id:#VFB_move

Also we add some default render elements with commands like this:

re = maxOps.GetCurRenderElementMgr()
re.addrenderelement (VrayReflection elementname:"VrayReflection")

Also we don’t use vrimg format, but EXR. So simply copying the file-path+name over from the batch (where we use exr) is sufficient.
The default workflow would incorporate this all so there is no need for enabling and naming the RAW buffer fields, we simply enable it by script.

A checkbox in SMTD beneath the “Use Data from 3ds Max Batch Render” checkbox under the “Misc” tab enabling the whole procedure would be amazing. We could change the script to our needs if you create a default one.