[Closed] setting vray separate render channels via maxscript
Hi!
I’m writing batch render script and trying to implement feature to set automatically render elements paths relative to main output file’s path. Max’s standard render elements work fine and predictable but with Vray’s frame buffer enabled something goes wrong.
Assuming that
vr = renderers.current
I enable vray frame buffer and set vray output by
vr.output_saveRawFile = true
vr.output_on = true
vr.output_rawFileName = "filename.exr"
Then I enable split render channels and set file to write to:
vr.output_splitgbuffer = true
vr.output_splitfilename = "filename.exr"
And nothing happens! Vray saves only “raw” file but not the render channels.
It creates them ONLY if I point split render channel file by the “browse” button!
Is there some checkbox I’ve missed or some way to further set output file name?
Thank you.
I’ve dumped all setting from manual setup and from maxscripted one and find the difference – in manual setup #output_splitbitmap property is set to last render element – “test.VRay_Normals.0000.exr” while in scripted it is empty.
I'll try to set this property from maxscript... But how to set different bitmap files for different render channels?...
UPDATE#1: #output_splitbitmap is not a file name, it’s a bitmap type!:sad:
UPDATE#2: this bitmap should exist in order to get hold on it, and supposing that this bitmap is a produce of render how can I set it before the rendering?
I think this property is set somewhere inside vray during the rendering and I still don’t know how to make render elements work when vray frame buffer is on.
Hi Sergo.
I had the same problem in my script
VrayMultiStageRender
I found the solution:
bm_filename = sysInfo.tempdir + "tmp.jpg"
bm=Bitmap 10 10 fileName: bm_filename
save bm
close bm
vrayrnd.output_splitbitmap=bm
deleteFile bm_filename