[Closed] Accessing Render Element channels after rendering?
I want to be able to get the renderelements such as Lighting, shadows, (actually Vray_shadows, Vray_Reflection etc) stored as bitmap values so I can use a post-render script to re-save them.
I’ve done some digging and found this… I rendered an image with Vray_Reflection element active then tried this.
Code:
[left]a = Vray_Reflection()
ReferenceTarget:VRay_Reflection
a
ReferenceTarget:VRay_Reflection
show a
.enabled : boolean
.filterOn : boolean
.atmosphereOn : boolean
.shadowOn : boolean
.elementName : string
.bitmap : bitmap
.vrayVFB : boolean
.color_mapping : boolean
.multiplier : float
false
a.bitmap
undefined[/left]
Hope the bitmap channel might reveal something… Any other ideas on how to access this information?
The pie – and this following paragraph -is a lie. See one post down.
I don’t think you can get direct access to them – at least not from stock 3ds Max. The bitmap value result from a render() ( or getLastRenderedImage() , etc. ) contain g-buffer information at best, but nothing on the render elements.
What you can do, of course, is iterate over the active render elements, get the file names they should have, open the appropriate bitmap with openBitmap() and go from there; but I’m guessing you were hoping to skip that
ohmy… LIES and darn lies.
quoth TFM:
Controlling the Renderer[left][ renderElements:<boolean> ]
[/left]
[left]If true or not specified, if render elements are present in the scene, those render elements will be rendered. If the outputfile: argument is specified, the render element output will be written to disk in the same manner as if rendered from the Render Scene dialog with the Render Output filename specified. If false, render elements will not be rendered. Available in 3ds Max 8 and higher.
[/left]
[left][ renderElementBitmaps:<&var> ]
[/left]
[left]If render elements are rendered, the render element output bitmaps are placed in an array (one array element per rendered render element), and this array is returned through the specified variable by-reference. If multiple frames are rendered, the final frame’s output is used. Available in 3ds Max 8 and higher.
[/left]
Never noticed that in any of the ‘what’s new in…’ topics.
pseudo-zaps other post
Thanks Zeboxx, that’s certainly interesting… but I was hoping there might be a way to access it without using Render() So I can set it up as a Post-render Script…
for that case, it might be back to the 2nd paragraph of my first reply; set/get the filenames on/from the render element, open the bitmap, process, (re)save.
Yeah I’m going to try that but the problem I’m attempting to solve is when strip renders over-write the render elements. I just hope I can grab the file as a bitmap before it’s written-over again.
I’ve finally found a solution to my problem, I can render any massive image in strips/columns/squares with render elements and it takes up just one space in the backburner monitor Not too complicated either Just got to write it all out now, the theory works
Rendering out a specific number of frames and doing a prerender callback to change the strip/crop on the frame? Or something like that? The only problem with that approach is you lose the automatic stitch, but that can be scripted as well.
-Eric
I am curious to see what you come up with. BB is such a pain sometimes but at least it’s free.
I think there are issues with AA at the edges of the regions. Unless you allow some overlap I think the AA may leave some artifacts at the region edges. This is why BB has the overlap option per strip.