Gamma correction - do you care?


That wiki article is fantastic. I am printing it out as I type and will take the highlighter to it this evening.

Thanks Z!


Thanks, I actually wrote most of that [is there a blushing smiley :D]

As a matter of fact the two links off that page about “linear color” and “what happens without gamma” is raw ramblings of mine someone copied off CGtalk and pasted into the wiki :wink:



That’s funny because I printed off the links too :slight_smile:

Cheers for sharing your knowledge with us!

I do have another question. I saw something in here about using gamma nodes attached to your shaders (Maya, in this case) to allow you to tweak the gamma in MR.

Do gamma nodes only need to be applied to shaders, or do they also need to be applied to lights? And if I attach gamma nodes to my shaders, does that mean I don’t need to mess with my gamma in Photoshop?

I had no idea the RGB scale wasn’t linear. That’s fascinating.


Correct images.
Your renderer is investing tons of time in calculating GI bounces, energy distributions, shadow nuances etc in the assumption that twice the RGB value equals twice as bright. Unfortunately, your monitor, your scanner and your digital camera disagree and unless you compensate for that, your results will be wrong.


Such a short sweet and eloquent way to put it! :thumbsup:



Any chance of pasting it into the CGWiki? :smiley:


If most renderers assume linear colour inputs do they produce linear output as well or make an internal gamma adjustment back to the non-linear colour model?


Sorry for offtopic, but maybe someone also could mention what is a color temperature for a monitor should be? 6500k?


Alright I just re-rendered a project I am working on and added gamma correction. Yikes!

I’m sold on it. Forever and ever. Now I can say I am a linear-renderer. Is there a merit badge for that?

Thanks guys!


This topic is for me a typical “you only see what you know”. Once you have realized/seen the difference it is obvious and a must, at least for me now. Thanks to MasterZap for shading some light into my gamma-uncorrected darkness ! :thumbsup:


I didn’t understand MOST concepts of Cg including gamma corrections until I learned photography. In photography (when working with slides not prints) you pay great amount of time in getting correct shadows and highlights. Being more on a technical side, I learned the math involved more detail, but applying that into art is a different thing which I didn’t understand until I learned photography. Today’s DSLR cameras have so much adjustments to make the correct color distributions. Features such as histograms helps too. But it was a eye thing and gut feeling when you use slides. Neverthless it is very important to know those.


Thanks stew & MasterZap

So, the benefit is that, if I see what renderer actually computes, I’ll be able to tweak my lightsources in a more physically accurate manner and get proper distribution of light without increasing energy multiplier and dealing with overbrights later, right? (uhh, long sentence)

Does one generally use gamacorrection together with tonemappers?


Yes Sandr0 that’s right (among other benefits).

Lights with physical falloff go from being very unwieldy and ugly to doing exactly what you’d wanted them to. It’s very true, once you see the benefits you kick yourself for not knowing about it before.

And yeah if you render to 16/32 bit linear images, when you compress the range down to an 8 bit image you can use straight gamma correction to get the ‘correct’ result, or use the tonemapper of your choice to get a ‘visually pleasing’ result with probably a high level of correctness. Like a balance between strictly correct and visually appealing depending on the purpose of the tonemapper (ie some try to correctly mimic our eye’s response to light).


Well I’ve read Zap’s article on the My Mental Ray site and my head has just about exploded, and I’m just as confused as before. I adjusted my Max settings to match the suggested ones and the renders certianly looked different, but when I looked at the renders in Photoshop and AfterEffects the image was very bright. So there is obviously something wrong with the way I have set things up. But I have no idea how to correct things nor do I know where to get the correct information from (for example most books on Photoshop assume you either you are a photographer, designing for print or a web developer, but I’m neither).

I use 3ds Max, Photoshop and AfterEffects as my main tools. When the latest Abobe products were released much was made about about how everything was fully colour managed, great. I read the articles in the manuals, bought a Spyder 3 to calibrate my monitor and decided to have a fully colour managed workflow. The thing is there is no information anywhere that I can find that tells me how to do it, plenty of articles on the theory but nothing practical. As a result I have all the colour management features switched off, because if I don’t images look different in each application.

The thing is I want to make sure things are consistant, I want my colours and gamma to be ‘correct’. I will happily sit down and read manuals, tutorials and guidebooks. I’m not stupid, but I just can’t find any answers.

Is there anyone out there that fully understands how everthing works, who can write a tutorial (or probably a book) on how to set things up correctly?

Garry ‘I’ve got a headache now’ Clarke


Hey Garry!!

Are you able to get the gamma correction tools to work, but they are blowing out your textures? Are you using .45 as a value for the gamma correction?

I don’t know Max, but in Maya that’s how it works… just place a gamma correction node between the file texture and the shader.

From what I understand you can also gamma correct your textures in your photo editing software, and then bring them into Max. But I like being able to control in on the 3D side.


Feel free to comment here



Many thanks, MasterZap, for shedding the light upon this gamma stuff.

 I have read that thread, and I have a question.

 I am max user, so to correct the gamma I've set that gamma setting all at 2.2 - like it was on a screen in one of your previous post. But now, using mrSun&Sky and mrPhotogrtaphic Exposure, I had different pictures in exposure preview window and actually in rendered frame window. Changing the gamma value, I've figured out that these pictures have the same brightness/contrast level only if gamma set to 1.0 (actually, any changes made to gamma setting in preferences has no effect on exposure preview window). Why is that happens, and what should I do? :shrug:

Could You explain that situation, please? :slight_smile:


Sir Kirya, I don’t use Max but my guess would be this…

In Maya when we change the mental ray gamma in our render settings, we are changing the framebuffer’s gamma. I’ve just realised I don’t have a nice short explanation of what a framebuffer is exactly, but it’s like a ‘stored set of data that makes an image’. When you press render, mental ray uses one or more framebuffers (the main one, a glow buffer, custom buffers you’ve created etc) to collect up all the data which you can then write to the hard drive as an image. My guess would be that the preview image is using a totally different framebuffer which isn’t having the gamma correction applied to it. A way to fix that would be to change the gamma on the mrPhotographic Exposure lens shader, which we can do in Maya but it looks like you don’t have that option in Max (judging by your screenshot)!

Maybe you could stack another simple lens shader onto your camera that merely changes the gamma? I’m not sure if you can do that in Max or not.

Of course I could be entirely wrong, but at least someone may find the info useful, hehe.



in Photoshop go to View > Proof Set Up and change to Monitor RGB or your platform. This should match the image display to the other programs.


The Photographic exposure control applies a default gamma of 2.2 if you have gamma correction off.