Jump to content

Suggestions on gamma setting in max


moris7
 Share

Recommended Posts

  • Administrators
This is amazing, I don't really understand everything you said Jeff but I'm amazed this is the first time this has come up. I've had this problem for years and didn't even know it I just accepted that RGB colors in Max were a little different than they were in Photoshop. So what happens when you have a bitmap that looks perfect in Photoshop, does it have the same Gamma problem in Max that material colors do?

 

What parts specifically did you not understand. I want to be sure the article I do is clear for everyone.

 

If it looks fine in Photoshop (ie. a texture you bought), then very likely the gamma is baked into the texture. That gamma would be the gamma of the display that was used to create that texture. Normally that's assumed to be gamma 2.2. Even if someone does not have a calibrated display, most will be close enough to 2.2. If the tetxure was created on a Mac then it would likely have gamma 1.8 baked into it. To work in a LWF you need to de-gamma your textures if the gamma is baked in.

 

If there was an ICC profile embeded into that image when you opened it in Photoshop, then there are some more things watch, btu I don't want to get too far off topic.

Link to comment
Share on other sites

Ok Jeff, You are going way beyond the call of duty here, but it so very much appreciated. I am going to go thru the file you sent and play around with the concepts and see what happens. I will get back to you when I have an idea what is going on. Thanks

Link to comment
Share on other sites

Jeff, so if I use the Color Correcttion plugin and change the gamma of a color to 2.2 rather than 1, that does not solve the problem? From what I can tell, it doesn't because the color ends up too dark. It looks like the correction is different across the RGB spectrum...meaning that the conversion is different for R than it is for G than it is for B.

 

Am I right about this?

Link to comment
Share on other sites

  • Administrators
Jeff, so if I use the Color Correcttion plugin and change the gamma of a color to 2.2 rather than 1, that does not solve the problem? From what I can tell, it doesn't because the color ends up too dark. It looks like the correction is different across the RGB spectrum...meaning that the conversion is different for R than it is for G than it is for B.

 

Am I right about this?

 

Can you post some screeshots. Also remember if you use either the VRayColor or the Gamma & Gain shader, you will use the exact RGB values from EasyRBG, not the corrected linear values as these shaders do the same thing as manually converting them.

 

An no worries about helping out. I love color management/LWF stuff. I haven't done any production for over 4 years, so this kind of fun. 3D without the PITA client. haha.

Link to comment
Share on other sites

  • Administrators

ok, that looks about right. Keep in mind that those material slots are being rendered, so when light is applied to any color, the color is going to change somewhat. I think the change it within expectations.

 

BTW If you want your color swatches to look right and you are using one of the gamma correct shaders, you can uncheck the "affect color pickers" if you like. Just make sure you remember to always use a gamma correct shader.

Link to comment
Share on other sites

  • Administrators

here is proof.

 

I screen captured the material editor and used the Photoshop color picker to sample the area in the red circle. I then painted over the swatch on the left. Looks pretty much identical to me.

Edited by Jeff Mottle
Link to comment
Share on other sites

Hi!

 

Id like to clarify a few things I have read and I feel that are misconceptions:

 

Distinguish Gamma correction applied for textures from Gamma correction applied for the dsiplay.

 

Those are totally independent features. The "Display Gamma" take the render output and transform it to "fit" your monitor. The "Bitmap Input Gamma" takes an image from disk and transform it to "fit" your renderer.

 

Gamma 1.8 for interior vs Gamma 2.2 for exterior:

 

Gamma is designed to take images that looks right on screen and linearize them for the renderer. In theory, you should set this value once in your studio and never touch it anymore, regardless of the lighting conditions.

 

Assuming that your textures are saved in sRGB space from Photoshop, loading them in 3ds Max and applying a Gamma correction of 2.2 will linearize the pixel values for the renderer.

 

When the images are linearized for the renderer, correct lighting interreflection can occur: lighting is calculated with additions and multiplications hence the expectation of being provided linearized images.

 

Why? well, from the lighting calculation point of view, a pixel from a texture represents a "reflectance value" (and not a perceptual color).

 

A reflectance value is an absolute reflectivity value that instructs the renderer to bounce 10, 20 or 40% of the incoming light. With a texture map, this happens at every pixel. With a flat colored material, this is constant on the entire material.

 

This proves that you should not use different settings for interiors or exteriors: it would be equivalent to say that a red apple changes its physical properties when its inside your house vs outside.

 

Using an output curve everywhere:

 

If in your practice you end up using the "Output" rollout of the maps and apply a curve to all your maps that looks like this :

 

attachment.php?attachmentid=32112&stc=1&d=1239365666

 

You might not have noticed it but you are in fact applying your own gamma correction! A curve like this is very close to the Gamma 2.2 correction that is applied on texture input when gamma is enabled.

 

My advice is to leave this off and use Gamma Correction on bitmap input instead: this will also be (slightly) faster rendering wise since the renderer don't have to apply a correction on each pixel: max provides him the corrected pixels directly since this happens in the image loading process.

 

How to gamma correct images on input?

 

http://download.autodesk.com/us/3dsmaxdesign/2010demos/design_color_space/3ds_max_design_color_space_820x500.html

 

This video shows the Gamma 2.2 at works and a comparison with textures shown in Photoshop. That should help you. Pay a special attention to the comparison at the end: you will see that the non gamma corrected renderings are washed out, overbleeding and the textures in the rendering don't match closely the "flat" textures when looked at in an image editor.

 

Tone mappers vs Gamma Corrected Frame Buffers

 

With the mrPhotographic Exposure control in 3ds max Gamma is internally compensated. In other words, wheter the Display Gamma is ON or OFF, the tone mapper will detect this and balance the image for you (its a good thing).

 

I am not so sure for Vray, I bet it is doing something similar.

 

HDR image on input:

 

Apply a Gamma correction of 1.0 (neutral). It is implied in the industry that HDR images are linear already.

 

HDR image on output:

 

Apply a Gamma correction of 1.0 (neutral). It is implied in the industry that HDR images are linear already. Keeping a gamma value to 1.0 on HDR output will also make possible proper maths in compositing (add and multiply assumes that the inputs are linear).

 

There is an excellent example of proper HDR compositing and proper maths on pages 47-50 of this document (which implies that the images saved in HDR are not set to a gamma 2.2!!):

 

http://www.mentalimages.com/fileadmin/user_upload/PDF/arch_and_design.pdf

 

 

 

 

 

Hope this helps,

Link to comment
Share on other sites

  • 10 months later...

Trying to tweak the gamma (using 2.2) mental ray max 2009 and I'm not sure about this. Between the environment settings (MR photometrics) + MRsun/sky - I feel like I don't have control over the brightness ..etc. Its blowing everything out. And when you adjust the photometric settings, the colours go really dull and weird.

 

Anyhow, this is my first 20 minutes with it. Will try to play with it more.

 

* just opened the really dark image in photoshop and it went really pale. Hmmm.

 

* edit. Ah, get it now. This is quite possibly one of the best things I've done in a while.

Edited by wasteland giant
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...