PDA

View Full Version : Problem with Gamma\LUT



qually
01-11-2012, 08:39 PM
Hi guys!

I started my 3ds Max experience two weeks ago. I'm using 3ds Max 2012 with mental ray as my renderer.

Although, I ran into a rather frustrating problem. I seem to have an issue with the gamma/LUT configuration.
When it's enabled, colors on objects (viewport and rendered) seems way too bright (compared to the color selector). When I turned it off, the problem went away. Although, I've read that I should leave it enabled at 2.2.

Also, I am wondering if I should use the realistic or shaded view in the viewport.

I searched on various websites/forums but cannot find a solution. I hope you guys can help me.

Here are 3 exemples of objects with gamma turned on and off.

http://i44.tinypic.com/eq9nxj.png
http://i40.tinypic.com/k1qmag.png
http://i39.tinypic.com/r8750h.png
http://i40.tinypic.com/259ikua.png
http://i44.tinypic.com/6zx4p5.png
http://i44.tinypic.com/wl2k41.png

I have also done a test with plane and gradients with a gradient bitmap from Photoshop and a gradient ramp map.

The bitmap is the upper plane and the gradient ramp is the lower plane.

Gamma ON
http://s16.postimage.org/vi4c36x81/Gradient_Test_Gamma_ON.jpg (http://postimage.org/image/vi4c36x81/)

Gamma OFF
http://s13.postimage.org/6f0l51ms3/Gradient_Test_Gamma_OFF.jpg (http://postimage.org/image/6f0l51ms3/)

Thanks so much for any help!

roxo
01-12-2012, 08:59 AM
Hey! There is now "right way" to use gamma correction. It depends on how you render your images and how do you import bitmaps such as texture maps or normal maps. If you work in a studio, you probably have it covered... the compositors will ask you to render a certain type of image format like 32bit EXR or 16bi tTIFFs.
It also depends on which renderer you use. V-ray has an inbuilt gamma feature that is a little bit different from the gammaLUT preference from max. If you use mental ray and render 16 or 8 bit images, you can use 2.2 gamma but also use 2.2 in both input and output bitmap files. If you render 32bit EXR or HDR images you can use the same settings but the output bitmap file should be at 1.0 (by default max renders images in 16 bit...if you want 32 bit you have to change it in the render settings).

The color picker problem is avoided by checking the two boxes in the gamma LUT window. By doing so you will notice the material slots a lot more bright and the colors more accurate. It is supposed to look that bright because you are compensating with a range of colors that your monitor is hiding. Imagine that you have a 50% gray, your monitor displays it a little bit darker and you will never know it because it is what you see. By working in a 2.2 gamma workflow you brighten the image to compensate the darkening of your monitor. So in reality you are rendering a true color image.

One other problem people ignore using 2.2 gamma is normal mapping. If you want to apply a normal map to a material, you use the normal map shader and then plug in the normal map image itself. When importing the image, you have to import it at 1.0 override on the import window dialog. Max will, by default, import all textures at 2.2 and that is ok, except for normal maps. If you don't override it at 1.0 you will get strange seams and weird shadow artifacts.

I know it seems complicated and there is few explanations online but search the web and you will find different workflows. The most "correct" and the most used is:

gamma: 2.2

Bitmap files
Input gamma: 2.2
output gamma: 2.2

Affect color selectors: Checked
Affect material editor: Checked

Remember if you render 32bit images the output gamma is supposed to be 1.0. Then in photoshop or other compositing software you adjust the gamma as you prefer. If you dont change it to 1.0 you will have 2.2 + 2.2 gamma aplied and that results in an over bright image.

roxo
01-12-2012, 09:16 AM
Think about it this way. Since the 80's people have been making 3D using wrong color gamma correction. They have been working with dark 3D scenes and they had to bright everything up with multipliers on lights and put ambient lights all over the place. That method of compensating with lights is very unrealistic. For a couple of years, gamma correcting has been widely used to avoid that. You can make a beautiful interior scene with only the sunlight and low GI settings. Before gamma correcting, people would boost up the GI multiplier and increase ambient in materials. Today we're lucky because we can work in a very clear workflow, with unbiased or photorealistic renderers.
I have found an image on google that sort of explains what gamma correction is doing:

http://www.eizo.com/global/products/library/basics/lcd_display_gamma/images/02.jpg

That compensation happens all the time, not only inside max. Every image, photograph or video is submitted to this kind of compensation. What we do in max is enable that compensation when creating an image from scratch.
The 2.2 color picker in max is showing you colors according to the second graph in that image. So you have less darker colors but a wider range of light.

chrisg
01-12-2012, 11:03 AM
Thanks for the in-depth post, roxo! It's users like you that make our forums great.