[Closed] MAXopenExr problems
Hey Eric,
thanks for the tip about Brazil.
I’m rendering a lot of images for use in an online shop. I’m compositing separate passes from VRay with maxscript while adjusting the lightingpass and applying an adjusted alpha-map to them. Previously I unpremultiplied the image myself with the use of the alpha-channel, but I was getting artefacts.
For now I’m trying the rpf-fileformat. I’ve never used it before, but it seems to support all I need. But I’ll definitely check out the rendereffect you suggest.
psd-manager 3 (PSD Export, Commercial) is scriptable. Supports 8,16,32 bit output. Premultiplied or straight Alpha… You can control the render elements (PSD layers) premultiplied/straight option too.
However, since it sounds like you need to be able to read it as well and 3ds Max unfortunately only supports 8-bit PSD files it probably is not of use to you.
Daniel
I’ve been messing around with this too, namely trying to take all the Render Elements, and add them manually in the EXR setup in a certain way. The only problem is, it doesn’t seem like it works unless I have manually closed the render dialog window before running the script. If I try to have the script do it, nothing changes. Anybody else have this problem or has a solution to it?
Oh yeah, this is Max 2012 and using vRay 1.5 if that has anything to do with it. Below is my code:
renderSceneDialog.close()
mgr = MaxOps.GetCurRenderElementMgr()
for x in 1 to mgr.NumRenderElements() do (
ele = (mgr.GetRenderElement (x-1))
fopenexr.addRenderElementLayerRef ele (ele.elementname as String) 1 0
print "Added " + ele.elementname as String + " to EXR: " + (result as String)
)
renderSceneDialog.update()
renderSceneDialog.open()
In fact, sometimes it doesn’t even seem to matter. There’s been no way to tell whether it will work or not, seems like sheer luck. What gives!
You may need to reset the path. Recently I found (last week actually) that you can script the main controls using layer 0 as the input. However, to get the files to stick you need to set the path again for the output file.
fopenexr.setLayerOutputFormat 0 0 -- set Main Render to FLOAT32
fopenexr.setLayerOutputFormat 0 1 -- set Main Render to FLOAT16
fopenexr.setLayerOutputFormat 0 2 -- set Main Render to INT32
fopenexr.setLayerOutputType 0 0 -- set Main Render to RGBA
fopenexr.setLayerOutputType 0 1 -- set Main Render to RGB
fopenexr.setLayerOutputType 0 2 -- set Main Render to MONO
So to change the main settings you need to call:
fopenexr.setLayerOutputFormat 0 2
fopenexr.setLayerOutputType 0 2
rendOutputFileName = rendOutputFileName
So in your case you can remove the close and open and simply set the output between the loop and the update:
mgr = MaxOps.GetCurRenderElementMgr()
for x in 1 to mgr.NumRenderElements() do (
ele = (mgr.GetRenderElement (x-1))
fopenexr.addRenderElementLayerRef ele (ele.elementname as String) 1 0
print "Added " + ele.elementname as String + " to EXR: " + (result as String)
)
[b]rendoutputfilename = rendoutputfilename[/b]
renderSceneDialog.update()
-Eric
That info has been passed to Bobo. So hopefully it will get added to the Maxscript Help in one form or another, at some point.
-Eric
And that info is now documented in the 2013 maxscript help on the fopenexr page.
-Eric
Yeah, but it is an uncredited addition. At least I know I actually provided something.
-Eric