Notifications
Clear all

[Closed] MAXopenExr problems

Hi,
I’m running into problems with the maxopenexr bitmap i/o interface. It seems that no matter what setting I set in my script (bitdepth, which channels to save, …) my exr-bitmapfiles are saved using the latest settings I used when saving through the ui.
So, let’s say I render an image, and save it manually through the ui using a bitdepth of 16. The image file is saved with that bitdepth. When I save the same image by script after I set the bitdepth to 32 by script, the image still is saved with the previously set depth of 16. It appears that none of my settings I adjust with maxscript seem to stick.
Does anybody have the same experience and maybe even a solution?

19 Replies

Did you closed the render scene dialog before making those changes? If not, you need to close it before doing any changes

Artur,
That’s a very good tip. I thought that rule only was relevant when adjusting rendersettings, but I didn’t know it also worked when adjusting bitmap i/o-settings.
I also found another mistake in my script unrelated to this topic. I’ve rendered images and separate render-elements to exr’s. After rendering, I’ve composited these elements together with a few adjustments.
When rendering, the inputgamma is set to 2.2 (together with all the relevant gamma-settings). This results in correct renders. When compositing, the inputgamma should be set to 1.0. I’ve omitted that last adjustment.

Yeap, the render scene dialog thing also applies to setting up bitmap I/O found that the other day the hard way too

As for your other problem, yes of course, display gamma in max should be 2.2 and output gamma should be 1.0 for later compositing, speccially if you are working with EXR.

Cheers and glad to help.

Exactly, outputgamma is 1.0 when saving the render. But if I’m comping the files later on in maxscript, the INPUTgamma needs to be 1.0 as well. That one took me a long time to find. I always have the inputgamma set to 2.2 to compensate for any bitmap-texture. But this doesn’t seem to work for the already linear exr-files.

Everything is working smoothly now and the queue is humming with jobs. Thanks for the help.

 JHN

On top of my exr setting function I have:


renderSceneDialog.close()

Then all exr settings are done, then the filename is being set, after that I also do

renderSceneDialog.update()

Just to be sure

-Johan

You may also want to post the version of 3ds Max you are using to set the parameters and the code used. With 3ds Max 2010 SAP Autodesk (2011+ no longer support or ship with the MaxOpenEXR plugin) changed the plugin, interface, and methods available. Also, some settings available to the new UI aren’t exposed to Maxscript.

-Eric

Hey Eric, good point.
At work I’m using max 2010 with the connection extension. It has the newer exr-gui. At home I’m using max 2010 without this extension.

At home saving exr’s with specific settings works as expected. For example:

exrio.SetSaveUseDefaults false--make sure we're not using some default-settings but our own specified settings
   exrio.SetSaveAlpha true --also saves the alpha in the image
   exrio.SetSaveAlpha false --skips the alpha

At work none of this works. It seems that you can only save exr’s with the settings which were used in the gui. In max2010 with the connection extension there’s a new ini-file in the plugcfg-folder. It’s called openexr.ini. This file contains all the available settings for importing and exporting the exr-files.
The previous code doesn’t do anything for me in the newer max2010. I’ve also adjusted the settings directly in the ini-file.

setINISetting @"C:\Program Files\Autodesk\3ds Max Design 2010\plugcfg\openexr.ini" "ExrExportInternalDefaultParams" "Dflt_SaveAlphaChannel" "TRUE"
  

But this doesn’t make any difference at all. The ini has been adjusted fine but the settings aren’t implemented when saving files through maxscript. All my exr’s which I save by script, use the same settings as the last exr I’ve saved through the gui.

Aha,

I’m seeing that in max2012 the exrio-interface has been replaced by the fopenexr-interface. Just as you said Eric, the methods are slightly different, and more importantly the two settings I needed: setting the alpha and using unpremultiplied output are unsupported. The alpha bit is partly documented, but the method to set the property hasn’t been exposed (I’ve looked in the online documentation and used the showinterface-method to inspect the interface).
Exactly these two settings are the ones I needed from the exr. Does anyone have more insight on getting get these two properties working again. Or does anyone know another supported fileformat which is hdr and can be saved unpremultiplied?
Tif and png can be saved as 16 bit, and tga can be unpremultiplied, but none of these three have both options…

The where/how you plan on compositing is the important thing. I have given up on unpremultiplied with EXR as there are various software bugs (some in 3ds max other in compositing applications) that make it a hassle. If you really need unpremultiplied I would download a copy of Brazil 2 Rio (free) and use the unpremultiply render effect that is part of that.

-Eric

Page 1 / 2