Adverti horiz upsell

hfAutoGamma.mel 0.1.0 for Maya (maya script)

automatically gamma-correct selected shaders

License
Button download
726 Downloads

Compatibility

  • 2009, 2008

Operating Systems

  • Windows

History

Created:04/02/2009
Last Modified:04/02/2009
File Size: 5.83 KB
this script is for making a linear workflow in mental ray a bit easier.

if you are using a lens shader for tonemapping (like if you're using physical sun) you need to individually gamma-correct all of your color textures and swatches in order to get accurate color in your render. this is really annoying.

this MEL tries to make that process easier. select shaders in your scene and run this script, and color-based textures and swatches will automatically be gamma corrected, making your life suck slightly less.

the script bases the correction on attributes that are looking for RGB values and not luminance values. this generally works really well with mental ray production shaders, but since maya's software shaders look for RGB values in weird places (like transparency), some channels might get gamma-corrected that you wouldn't normally expect. sorry.

this script doesn't play well with ramp shaders right now. or layered shaders, for that matter. i might add support for those later.

to run the script: put in your scripts folder, select the shaders you want to correct, then type "hfAutoGamma(0.455)" in your script editor. you can replace that number with any other number if you're trying to correct for a different color space.


Please use the Bug System to report any bugs.
Please use the Feature Requests to give me ideas.
Please use the Support Forum if you have any questions or problems.
Please rate and review in the Review section.

People who favorited this item:

  • rushcg
    rushcg
  • Vitalii Kyryliuk
    Vitalii Kyryliuk
  • elviocb
    elviocb
  • xtvjxk
    xtvjxk
  • kaiyongman
    kaiyongman