Template:MR texture gamma

From TOI-Pedia

File textures may get washed out, because of incorrect gamma. By default, the mia_exposure_control applies gamma correction on the final image. Mental Ray expects file textures to be 'gamma neutral' (linear color space), which they are (probably) not. Chances are you've created them on a computer screen, which is normally in sRGB color space, with a gamma of 2.2. If the mia_exposure control corrects the final rendered image to the gamma you specified, the textures would get gamma-corrected again, which causes them to look washed out:

MR gamma correction off.jpg
MR gamma correction on.jpg

The left side shows a render without proper gamma correction, the right side shows the render as it is supposed to be, after proper gamma correction of the file textures.


The preferred solution: Enabling Color Management in Maya and setting the gamma value of your mia_exposure node to 1.0.


Alternatively you could fix the problem without using color management:
  • You could change the Mental Ray internal framebuffer gamma and the Exposure control gamma,
  • or you could gamma-correct each file texture using the Gamma Correct node in the Hypershade.

The first method is the easiest to implement:

  • Open you Render settings, Quality tab. Find the Framebuffer section and open the Primary Framebuffer subsection. Set the gamma to 1/desired gamma, so 1/2.2 = 0.4545 for a end-result gamma of 2.2
  • Set the Gamma of your mia_exposure_simple or mia_exposure_photographic to 1.00.

The second method involves creating Gamma Correct nodes in the Hypershade for each file texture and setting it to 1/2.2: 0.4545 for each color channel. This process can be automated using the MR Gamma correction MEL script. This will add gamma correction nodes to all file textures, counter-correcting them for the specified gamma, so the end result should look good.


Personal tools
Actions
Navigation
Tools