choose exposure

david | dj mod,mel script,mentalray,rendering | Tuesday, October 16th, 2007

In maya 2008, when you create a Physical Sun and Sky environment from the Render Settings window several shaders are added to your scene. One of these is the mia_exposure_simple shader which is a simple tone mapping shader that is connected to the camera as a lens shader. However one of the new features of maya 2008 is the addition of a more powerful tone mapping shader called mia_photographic. To make it a bit easier to get started with this new lens shader I modified one of maya's mel scripts and added a user interface for choosing which of the two exposure methods is used.

chooseExposureUI.jpg

This UI saves you having to make the lens shader connections manually.

To install it you need to download a modified version of createMentalRayGlobalsTab.mel (2008) or createMentalRayIndirectLightingTab.mel (2009) and place it in your local scripts folder, and restart maya. (No userSetup.mel edits for this one). If you decide you don't like it, just delete the local modified copy.

Download here.

update 19 March 2008: rar file now also contains a version for maya 2008 sp1

update 6 Feburary 2009: Modified createMentalRayIndirectLightingTab.mel for maya 2009. This should be used instead of the modified createMentalRayGlobalsTab.mel.

update 7 July 2010: Added maya 2011 version of createMentalRayIndirectLightingTab.mel

6 Comments »

  1. do i need to have maya 2008 to use the "miCreateSunSky" script to use this function????

    Comment by djpitha — October 25, 2007 @ 5:20 pm

  2. djpitha, the modifications were done to the maya 2008 version of createMentalRayGlobals.mel. This file exists in maya 8.5 but it is not exactly the same. There is a chance the 2008 version will work with maya 8.5, but I have not tried it myself. If you do, please heed my advice about putting it in your local scripts folder so you dont mess up the installed version. If it doesnt work you just delete the local copy. In the header of the modified file I list the procedures that were added or changed, so you might be able to have a go at an 8.5 mod of your own - if you like getting into some mel that is.

    Comment by david — October 26, 2007 @ 10:05 pm

  3. Is there a posibility to make this plugin to work for maya 2009?

    Comment by giannisM — February 5, 2009 @ 12:03 pm

  4. Yes, there is now a link to the new file on the downloads page. (Read updated post above for details).

    Comment by david — February 7, 2009 @ 12:18 am

  5. Hi david, I have noticed that you set the physical tonemapper gamma to 1 and the miDefaultFramebuffer to 0.4545

    What advantage do you get from this? From what I see you still need to add a gamma node with 0.4545 to all texture and color slots anyway...

    thanks

    Comment by kobayashy — September 3, 2009 @ 6:09 am

  6. I cant believe its been almost 2 years since I made this little exposure mod. At the time I had read an article by Floze (aka Florian Wild) where he explained how he did it that way, and it seemed like the right way, so as well as giving the choice of exposure node, I also changed some defaults - since they are set in the same mel script.

    However in the years that followed, much has been written about the handling of gamma and linear workflow in maya (I even wrote some of it myself). I have experimented with different approaches and changed my working methods as I learned more. Currently I have gone back to the original maya default, which is: frameBuffer gamma = 1, exposure gamma = 2.2. The main reason is problems with finalgather, bump mapping and eliptical filtering of fileTextures when using a frameBuffer gamma other than 1. (There are some other issues to do with the way final gather is calculated, but that is not the main reason).

    These are just simple edits in createMentalRayIndirectLightingTab.mel if you need to change them.

    I was hoping that by now I would be writing something about the new linear workflow in maya 2010, but we are not so lucky.

    Comment by david — September 3, 2009 @ 10:41 pm

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.

Powered by WordPress | Based on a theme by Roy Tanck