changing output format from .bmp to .exr

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  12 December 2007
changing output format from .bmp to .exr


I'm using a script to split a high resolution render in smaller chunks, so that I don't run out of memory. It works quite well, but it saves only to .bmp. What would be really nice is, if I could change this to .exr. I've tried replacing everything 'bmp' with 'exr' but it didn't work, so I guess it takes something more to do this.

---          BIGRENDER            ---
-- Make a "infinite" render without-- 
-- memory problems and compose it  --
-- after rendering.		   --
-- Author : Tomas Cayuela          --
-- August 2003			   --
--		   --
plugin RenderEffect BIGRend
	rollout params "BIGRender Parameters" ( 
		group "Output Size" (
			spinner tamH "Width: " align:#left range:[0,99999,5000] type:#integer fieldWidth:50
			spinner tamV "Height:" align:#left range:[0,99999,5000] type:#integer fieldWidth:50
		group "Subdivision"(
		spinner subdivH "Subdivide Horizontal by: " align:#left range:[1,20,20] type:#integer fieldWidth:40
		spinner subdivV "Subdivide Vertical by: " align:#left range:[1,20,20] type:#integer fieldWidth:40
		group "Render"(
			button filsav "Save as..."
			checkbox vf "Display Renders" checked:false
			edittext akita "" enabled:false
			button rend "RENDER" enabled:false
			label tantode "0/0" align:#left
			progressBar barra	
		group "About"(
			label sobre "BIGRender"
			label sobre1 "Tomas Cayuela Caudevilla"
			label sobre3 "Discreet Training Instructor"
			label sobre2 ""
			label sobre4 "This Plugin is FREEWARE"
		on filsav pressed do(
		filenam=getSaveFileName caption:"Save as:" types:"OpenEXR Image File(*.exr)|*.exr|" 
		on rend pressed do(
			for j=1 to subdivV.value do(
				for i=1 to subdivH.value do (
					if keyboard.escPressed then exit
					arx_nom=getfilenameFile akita.text
					arx_path=getfilenamePath akita.text
					arxiu = arx_path + arx_nom + indexV as string + "_" + indexH as string + ".exr"
					render vfb:vf.checked outputfile:arxiu outputwidth:tamH.value outputheight:tamV.value renderType:#crop region:#(b,a,d,c)
					progf=prog as string + "/" + prog2 as string

Any kind of help or any pointer in the right direction is much appreciated. Thanks in advance!

edit: I'm using R9 by the way and I'm aware that I could also contact the author of this script. However, I'm not sure if he provides support for this, because he now sells a newer version of this script, which is obviously no longer freeware.

Last edited by pd : 12 December 2007 at 10:25 AM.
  12 December 2007
Hmmm i'm not sure what problem you're having, but i just copied and pasted what you have there, ran it in max 9 and 2008 and both saved my images out as .exr files and opened each image in photoshop just fine.

Have you made sure the script isn't loaded in max with the old version? Try changing the name to bigrender2 so it creates a new effect in your render effects, and isn't just trying to over right the old one but failing.
  12 December 2007
Thanks a lot for your input!

I should have stated what exactly isn't working, sorry. While I got the script to save as an .exr it somehow wasn't really an .exr. It opened fine in photoshop, but the file size was smaller than, when I would save it by myself using the vfb. As a result the image didn't have the value range it should have. For example, I have tested this with a simple scene, which has an area that is over exposed. With the version I saved out myself, I can easily turn down the exposure and everything looks as expected. With the version, saved by the script the same process will show a flat looking area. Please see the attached pictures.
Attached Images
File Type: jpg exr.jpg (67.5 KB, 19 views)
  12 December 2007
I've just isolated the problem somewhat. I was using VRays vfb to save this .exr(the first row, the one that worked fine). When using Bigrender, I've disabled it and rendered without a vfb at all.

Now, if I'm using Max's native vfb to save out the render I get the same problem. The resulting image simple doesn't have a HDR.

edit: Having VRays vfb activated and using Bigrender to save the .exr still does not work. So the problem is either Max's vfb itself or VRay not 'translating' its output to the Max vfb correctly.

Last edited by pd : 12 December 2007 at 07:29 PM.
  12 December 2007
Now we are talking

The script uses the render() method which calls the renderer and gets the resulting portional bitmap back from it. By default, MAXScript gets these bitmaps as 8bpc images, so each color is in the range from 0 to 255.

To get the render() method to work with 32bit floating point data, you have to add the switch:

[ outputHDRbitmap:<boolean> ]
When set to true, the new 32 bit floating-point frame buffer will be used. When set to false or not supplied, the standard frame buffer will be used. Available in 3ds Max 8 and higher.

So try changing the line

render vfb:vf.checked outputfile:arxiu outputwidth:tamH.value outputheight:tamV.value renderType:#crop region:#(b,a,d,c)


render vfb:vf.checked outputfile:arxiu outputwidth:tamH.value outputheight:tamV.value renderType:#crop region:#(b,a,d,c) outputHDRbitmap:true

  12 December 2007
Thanks for jumping in Bobo

It works like a charm now. It would have taken me ages to figure this out by myself, if I would have been able to figure it out at all. So thanks again. I hope being able to return the favor one day.

Jsnyder: Thanks again for your effort as well.
  12 December 2007
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 06:43 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.