I wouldn’t say impossible Mike but this is 3dsmax we’re dealing with here…
I’m running some test this morning… Vray 2.2 and Max 2011, Deadline 5.1
Test 1:
Set my main render to an Test_01.EXR file, (not adding in render elements)
Added a VRayGI element
Added a VRayRawLighting element
changed the VRayRawLighting element to .tga
Rendered Locally…
Result: Test_01.exr, Test_01_VRayRawGlobalIllumination.exr and Test_01_VRayRawLighting.tga
All files the correct formats for their filenames.
Test 2:
Changed the main Render Output to Test_02.exr
Rendered Locally…
Result: Test_02.exr, Test_02_VRayRawGlobalIllumination.exr and Test_01_VRayRawLighting.tga
All files the correct format… but the tga file didn’t get its name updated. Looking in the Render element list it hadn’t been updated there either.
Test 3:
Deleted all render elements,
Set main output to Test_03_.exr
Added the elements as before changing the RawLighting to a tga file
Submitted to Deadline without the ‘Rebuild Elements’ tickbox (my bit of code)…
Result: Test_03_000.exr, Test_03_VRayRawGlobalIllumination_0000.exr and Test_03_VRayRawLighting_0000.exr
The first two EXRs are correctly formatted but the RawLighting is infact a tga file with a .exr file extension.
Looking at the render element list the RawLighting now has an .EXR extension. (Deadline is set to update render element paths and filenames)
Test 3b:
Deleted the Test_03 renders and rendered locally.
Result: All files saved as EXR files and all in EXR format.
Test 4:
Deleted the Render elements, set the main output to Test_04.exr, added the render elements as before and renamed the RawLighting to .tga
Sent to deadline with all Repathing options turned off, (Update Render Elements’ Paths, Also Update RE’s Filenames).
Result: Test_04_0000.exr as an EXR file, Test_04_VRayRawGI_0000.exr as an EXR and RawLighting_0000.tga as a TGA file! Success!
Test 4b:
Changed the Main Render output to Test_04b_ and the RawGI element changed names to Test_04b_VRayRawGlobalIllumination, but the RawLighting stayed as Test_04_VRayRawLighting.
So, the problems come from Max not updating all render elements and when Deadline updates the render element paths it doesn’t respect the Render Element’s original file-type.
Looking at the Deadline code which does the RenderElementsUpdatePaths() function the reManager.SetRenderElementFilename is getting the filetype from the main output not the render element in question.
Test 5:
I changed this section of code to getFileNameType reFilename instead of getFileNameType OutputFilename
if SMTDSettings.RenderElementsUpdateFilenames then
(
reManager.SetRenderElementFilename i (newPath +"\\" + getFileNameFile outputFilename + "_" + ((classof theElement) as string) + getFileNameType reFilename)
)
else
(
if reFilename != undefined and reFilename != "" then
reManager.SetRenderElementFilename i (newPath +"\\" + getFileNameFile reFilename + getFileNameType reFilename)
else
reManager.SetRenderElementFilename i (newPath +"\\" + theElementFolder + getFileNameType reFilename)
)
Set the main output to Test_05_.exr, added the RawGI element, added the RawLighting element and changed to .tga,
I then sent it off to Deadline with the “Update Render Elements’ Paths”, “Also Update RE’s Filenames” turned on.
Result: Test_05_0000.exr saved as EXR, RawGI saved as exr, RawLighting_0000.tga saved as a TGA!
Test 5b:
Just changed the main output to Test_05b_.exr kicked it off through Deadline,
Result: Test_05b_000.exr, Test_05b_VrayRawGlobalIllumination_000.exr and Test_05b_VRayRawLighting_0000.tga all in the correct formats.
Test 6:
Kept the render elements as they were and changed the render output to Test_06_.tif, (thus recreating the initial conditions that this thread was based upon, if you change the main render output type it messes up your render elements.)
Result: Test_06_0000.tif in TIF format, Test_06_VRayGlobalIllumination_0000.exr as an EXR file and Test_06_VRayRawLighting_0000.tga as a tga file.
So the fix above is a much more simple fix than the one I posted earlier in the thread but if you set up all your render elements doing quick render tests with JPEGs for some reason then switch to EXR for your main renders the elements will still be JPEG, but at least now they will save out with a .jpg extension and not be a saved with an incorrect filename.
Test 6b:
Enabled the “Rebuild Render Elements” option in Deadline which I added earlier in the thread…
Submitted to Deadline.
Result:
Main RGB and render elements all save as .tif files in TIF format.
So in conclusion, the fix above should be put in straight away in my opinion, but then it’s probably sensible to put a Sanity check warning message in to warn the artist that the render element formats don’t match their main render format. If you don’t want to render mixed format render elements and want to make sure that the render elements are always the same format as the RGB then keep the ‘Rebuild Render Elements’ option ticked (available in Deadline 5.2 if you haven’t already added it.)