Home Technical Talk

re gamma correction in max

Ruz
polycount lvl 666
Offline / Send Message
Ruz polycount lvl 666
this has been driving me nuts for a while. In max when using mental ray and you set your gammma to 2.2, which texture maps need to set at 1.0 and which at 2.2 ? For example, normal maps are left at 1.0 , diffuse would be 2.2, what about specular, specular colour and glossiness/displacement or bump?

I still don't understand why I have to set gamma to 2.2 at all when its looks perfectly fine when I turn it off.
Any help on this would be great and I realise there will be lots of links to explanations on the web, but a simple explanation would be nice.

lastly should bitmap input and output gamma both be set to 2.2 ?

Replies

  • xXm0RpH3usXx
    Options
    Offline / Send Message
    xXm0RpH3usXx polycounter lvl 13
    i found this one helpfull for uznderstanding the basic concept. its not too long and detailed enough:

    http://www.polycount.com/forum/showthread.php?t=97192
  • LoTekK
    Options
    Offline / Send Message
    LoTekK polycounter lvl 17
    As a general rule, if your texture is meant to represent numerical data, it should be linear (eg. specular, spec power, etc). If color, it should be gamma (2.2).

    Now this is not a hard and fast rule, per se, since you're perfectly fine using sRGB for your specular textures as long as you can get the look you want. The key benefit of using a linear colorspace for "value"-type textures is precision:

    220px-GammaFunctionGraph.svg.png

    If you look at the CRT Gamma curve, you'll see that you effectively lose all kinds of precision at the high (and especially low) ends of the scale (basically your very darks and very lights).
  • Farfarer
    Options
    Offline / Send Message
    http://filmicgames.com/archives/299

    This has been the most insightful thing I've read regarding gamma, explains it pretty well.

    But yeah, all diffuse textures go through gamma correction, all others don't (because they're absolute numbers just hard-coded into an image - things like normal maps and spec/gloss maps, etc).

    I believe gamma on most PCs will hover around 2.2. On Macs it's around 1.8.
  • Ruz
    Options
    Offline / Send Message
    Ruz polycount lvl 666
    I will read through the links more carefully this weekend, so thanks for posting them.
    so would spec colour, be 2.2 or 1.0, because it seems to be like diffuse in that it is a colour map.
    also if you mess with the gamma on specular , would n't it just make it darker or lighter, which you could then adjust in the texture itself or dial the spec strength up or down? why bother 'not' gamma correcting it though.
  • Farfarer
    Options
    Offline / Send Message
    Spec colour's an oddity because it's not technically realistic in a physical sense (most surfaces don't affect specular colour as they're dielectric - metals and such follow a specific equation to calculate their effect on the colouring they give to their lighting) so if you're going for the realism of gamma correct lighting it doesn't really fit in.

    But as the light and diffuse colours are being gamma corrected, you'd probably need to do the same for the spec colour. It'd probably mean splitting spec colour and spec level out into two textures if you want the brightness to be correct, or you'd have to account for that in your spec texture.

    You might also find that you don't actually need a spec colour map when you use gamma correct lighting.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    I tend to generally make sure my Spec's are manually Gamma Corrected (EI: Power the Spec to 1,0 or 2,2 through a slider) since it, as many peeps noted here, changes alot from case to case.

    For example on human Skin, I found 2.2 worked perfectly fine if the renderer in question is created around said workflow, but in many other cases, 2.2 actually ended up negating my specular effect, forcing me to bump it up, which in turn caused excessive amounts of bloom to be shown.

    Then there is the issue of Attenutation and if the renderer reads Light color from the source correctly, but that's a different ball-park.

    Since you're using Mental Ray and Max, did you try and enable Gamma/LUT 2.2 universally? Mental Ray should automatically apply those corrections during render.
Sign In or Register to comment.