Ok. First off, I made a test image in Photoshop. It is using the generic sRGB color profile (like pretty much all digital images) and so has a built-in 2.2 gamma:
Now, for the simplest possible test of the whole gamma correction thing I just assigned it to a surface shader and did a test render with no gamma adjustment of any sort:
Looks pretty much exactly the same. So then I went ahead and attached a mia_exposure_photographic lens shader to my camera. With the gamma on the lens shader at 2.2 I did another render:
It is washed out - as expected. As I understand it, this is because the image's built in gamma is being further exaggerated by the gamma adjustment of the lens shader. So one approach is to attach a gamma adjustment node to the image file. I give it an adjustment value of 0.455 to de-gamma the original image:
This brings it back to normal again - as expected. The alternate method (which I learned from the famous Floze lighting tutorials) is to adjust the framebuffer gamma. But before I do that, as a quick test, I try turning the gamma setting in the lens shader back to 1.0. Now the image is being de-gammed (not a word) down to .455, but the lens shader is not re-adjusting it back to normal, which I believe means I should get a darker image (the opposite of my first washed out image):
This is, indeed, the case. So now I am ready to try the framebuffer method. As I understand it, setting the mental ray framebuffer gamma (in the render settings) to .455 will apply a global de-gamma effect to all images (unclear if it should apply to color swatches as well). As I understand it, I can use this approach instead of having to attach a gamma correction node to all of my image file nodes. Therefore, I should be able to remove my gamma adjustment node from my image, instead set the framebuffer gamma to .455, and set the lens shader gamma to 2.2 and I should get my original image when I render:
The image is washed out - NOT what I expected. It is like the framebuffer gamma adjustment is not de-gammaing (not a word) my image file. To get a better sense of what is going on I left the framebuffer gamma at .455, but removed the lens shader. Now I would expect to get a dark image like I did earlier:
Again - I am wrong. The render looks like my original default test. Therefore the gamma adjustment that I am expecting to occur is not happening. Am I missing something? Why is this not performing as I would expect it to?
So then I went back and re-read the Floze tutorials:
"As you can see from Fig. 8, we set the Gamma value in the Render Globals’ primary framebuffer menu to the desired value, which is - simply because mental ray works this way - 1 divided by the value (2.2 for approximating sRGB in our case), which equals 0.455."
So he uses the framebuffer to de-gamma his images, which is what I expected. Now I would assume that he would want to keep his lens shader's gamma at 2.2 during all his test rendering (otherwise all his textures would be coming out rather dark, right?). Then, when it is time for his final render (to 32bit), he would simply set his lens shader gamma back to 1 to create a nice linear exr that he can then adjust in post. But this isn't what happens:
"At the same time, we also need to remove the gamma correction of our lens shader, so we must set its Gamma attribute to 1.0 (linear equals no correction; you can select these shaders from the hypershade’s Utilities tab)."
Linear equals no correction - which is the same as a DEFAULT render, right?? I thought the whole point of a linear workflow was to use that 2.2 gamma correction in the lens shader so that you weren't adding tons of lights (or physically inaccurate lights) in order to brighten up the image???
My understanding was that the 2.2 gamma in the lens shader gave you that brightening boost that corrected for the fact that Maya does not work in a 2.2 color space. The point was to use it so that you could get more pleasing images out Maya when using phsyically accurate falloff and whatnot. I thought the de-gamma adjustment of your image files is to compensate for the overall gamma adjustment of the final image (to avoid blown out textures).
But my understanding is turned upside down because Floze does NOT use that method. He adjusts the lighting in his test renders without the 2.2 gamma being applied by the lens.
Then, to further confuse the issue, my framebuffer gamma adjustment doesn't even seem to work like I would expect it to...
If anyone can iron me out on this, I would be eternally grateful. I have been making a supreme effort to get on board with the linear lighting workflow but I seem to be confounded by contradictory information and confusing results...
*edited to fix wacky font problems (what the heck is the default font/size?)