Home Technical Talk

Yet another Gamma thread

polycounter lvl 8
Offline / Send Message
Bleed polycounter lvl 8
Hello folks. I have a quick question for you regarding gamma, maybe someone can enlighten me.
I know the basics already, what gamma does and how it should be applied and calibrated per display.

But i have a more software specific question, in theory it should be the same for any 3d package out there, i think.

Anyways, my quick question is, if my monitor is already calibrated and uses an accurate color profile (colorimeter corrected) should i still turn on gamma in 3ds max?

It's on by default and it makes all my colors washed out. And yes, i know that i have to redo the colors and materials again, to reflect this new range, but this also messes up my textures. It messes up their contrast and i think saturation (because if i try and bring the brightness down it also increases their saturation).
As an example, if i wanted to bring a texture's brightness down and make it darker and not so washed out, how would i go about it?

Replies

  • Shrike
    Offline / Send Message
    Shrike interpolator
    Never trust 3DS with anything, really. Especially not the viewport. We always turned the default off, havent used it for some time, but turning it off should be equivalent to linear space and remove those ridiculous terminator shadows. Also don't use those default 3DS materials theyre a leftover from 2000 or so. Theyre fine to get some kind of impression but thats it. If you want to render something in 3DS properly youll need Vray or such and if you want to make game stuff, check your textures (and normals!) in a game engine, but please someone correct me if im wrong.
  • Noors
    Offline / Send Message
    Noors greentooth
    Yeah, 3ds viewport sucks with gamma on, and basically, 3ds max sucks with linear workflow.
    Do you need to render scenes ? If no, don't bother with gamma.

    If you need to render stuff, lwf is the way to go. Follow some guide on it. Texture colors shouldn't be washed out. That's because a gamma correction is applied twice on them (gamma 4.4). I'm talking about a final render here, not the viewport (which sucks, did i mention that already ?) You need to specify that input textures are already gamma corrected.
  • Bleed
    Offline / Send Message
    Bleed polycounter lvl 8
    Oh, apologies i should have been more specific. I do use max for renders and they end up as washed out as the viewport, sometimes even more. Normally i work with gamma turned off but i really should try experimenting with it, otherwise i'll never learn about it.
    I'm using max 2009 and i remember reading that version and earlier ones uses somewhat wrong gamma corrections, can't be sure if that is the problem.
    I did try changing the input override to 1.0, yet that's not the problem.
    This is what i mean, gamma off :

    20rqwx.jpg

    Gamma on, Input 2.2 :

    jt6mwg.jpg


    Edit : Holy -- it's even worse when posting it. This is what i originally end up with :

    2qsugld.jpg

    My Gamma settings :

    2r62z48.jpg

    And Input Gamma of 1.0 :

    9i4n4x.jpg
  • Eric Chadwick
    Once you enable gamma correction, you need to fix the lighting in your old scenes. I suspect that's what you're running into here. All your old content will suddenly look wrong.

    Some articles here that should help you sort it out. The first one by Martin Breidt is very relevant to you, as it focuses on Max 2009 which has a few quirks.
    http://wiki.polycount.com/wiki/Gamma
  • Bleed
    Offline / Send Message
    Bleed polycounter lvl 8
    I did play with the lighting also, but it just makes the scene look darker/brighter, the washed out look it's still there.
  • Eric Chadwick
    Not just the lighting, also the materials need to be adjusted. And the ambient, if you're using that.
  • Bleed
    Offline / Send Message
    Bleed polycounter lvl 8
    "And yes, i know that i have to redo the colors and materials again, to reflect this new range, but this also messes up my textures. It messes up their contrast and i think saturation (because if i try and bring the brightness down it also increases their saturation)."

    2qsugld.jpg
  • Eric Chadwick
    Right. If you want to work in a gamma corrected workflow, it's all-in or nothing. Decrease brightness alone, and that's what you'll get, saturation is still strong. You have to take it all down.

    Did you read Martin's pdf?
  • Ashaman73
    Offline / Send Message
    Ashaman73 polycounter lvl 6
    When working with gamma you need to know, that all renderer (i.e. game engine or 3d max), blending (i.e. photoshop layers) will work in linear space (no gamma at all). On the other hand, the monitor "expects" a gamma corrected image.

    So, starting with a simple image displayed in photoshop, this will be a gamma corrected image, the problem occurrs, if you put this image as texture into a renderer, which requires a linear space image (no gamma correction) and later, after rendering, when you try to display this (linear) image on the monitor.

    Therefor you can adjust 3dmax to cancel gamma correction for "input" material (i.e. texture) and reapply gamma correction afterwards (output). To cancel a gamma value of 2.2 you need to apply the inverse gamma value 1.0/2.2 ~ 0.45.

    So try to use a gamma input value of 0.45 for an output value of 2.2. I would guess, that is should look similiar to not applying gamma correction at all. Why ? Because I think, that most of your material will use sRGB (which includes kind of a gamma correction) and that 3d max will convert the final linear image into sRGB too, which should be displayed properly on most monitors.
  • Bleed
    Offline / Send Message
    Bleed polycounter lvl 8
    Not sure if it looks good on anyone else's monitor, but on mine it looks even more washed out.
    Input gamma of 0.45 :
    2li771t.jpg
  • RN
    Offline / Send Message
    RN sublime tool
    Could you explain why you're switching to a linear workflow?
  • Bleed
    Offline / Send Message
    Bleed polycounter lvl 8
    Currently I'm only experimenting with it, it's not such a big deal, but i will have to learn about it sometimes.
    Also, lighting's giving me trouble because of over-burning everything, I've heard gamma will fix that.
    And i may be wrong, but isn't it what most professional artists use anyway, a linear workflow i mean?
    Do you guys have gamma turned off?
  • Ashaman73
    Offline / Send Message
    Ashaman73 polycounter lvl 6
    Bleed wrote: »
    Do you guys have gamma turned off?
    Depends ;-) Gamma correction is a nasty topic.

    The problem with gamma correction is, that you need to apply and reverse it really often (read texture -> reverse, write framebuffer -> apply).
    So in an artist pipeline these operation are applied all the time, but this will be (hopefully) done by all the tools and engines you use.

    The confusion already starts when using a simple file:
    Does the file contain gamma corrected data or does the tool which displays the data apply gamma correction ? Are the image data are gamma corrected or is the gamma correction just a property of the fileformat ? How can the user detect, if a file is saved with or without gamma correction ?

    So, I would recommend to look into sRGB, a color space which already manage gamma correction (~2.2) and which is widely supported by monitors, game engines (sRGB textures are correctly transformed into linear space and the output, is although transformed back to sRGB) and tools. So, your private work-pipeline could benefit from using sRGB everywhere.
  • Bleed
    Offline / Send Message
    Bleed polycounter lvl 8
    As an example, let's just say that I'm only using 3ds max and all my textures were downloaded from the internet, with no other post-processing or changes done.

    How would i appropriately enable gamma correction in this case?

    And i thought 3ds max works and exports (with jpg, png etc.) in sRGB color space, what are you talking about here, because I'm confused.
    Actually what does gamma have to do with sRGB anyways?

    Again, I'm working on a standard windows PC with a sRGB monitor and with sRGB textures -- not digital camera pictures.
  • gnoop
    Offline / Send Message
    gnoop polycounter
    Have never had any problems with gamma in 3d max. It does everything linear with gamma on automatically and not other way around

    Check if texture open dialogs are NOT set to gamma 1 and rather use picture own gamma or system default ( if input checkbox in gamma/lut tab is set to 2,2)
    Untill you are saving special textures with gamma1.

    Check your lighting setup and exposure control

    ps. with sRGB textures by default Max does degamma operation internally , then renders, then apply 2,2 gamma back onto frame buffer . So it all should work just straight forward without any troubles . I remember there was a bug in exposure control before. Something in mr Phisical scale settings. I remember I set unitless 70000 there or something

    That gamma error may occur if you save as exr and then open in Photoshop. Save with gamma1 in such case.


    By setting input gamma 1 or even 0,45 you do not cancel gamma correction , you just tell 3ds max that you have alredy done it before feeding the texture to Max while most probably you haven't actually.
    And in such case Max would not do any internal degamma calculation before rendering and still apply post-rendering gamma 2,2 making everything washed out.
  • Bleed
    Offline / Send Message
    Bleed polycounter lvl 8
    Ok, this thread makes less and less sense with every post, so I'll just have gamma off, until someone can explain to me why all the washed out colors in my renders, without all the technical, low-level details.

    At this point i just wanna know what i have to do to avoid washed out materials, don't really care what max does under the hood and why.

    Thanks a bunch for the replies guys...
  • gnoop
    Offline / Send Message
    gnoop polycounter
    Having gamma off in settings you risk to mess other parts of rendering pipeline.
    mrShaders, day light system, caustics, exposure control etc. Everything would be slightly off and a subject of non stop tweaking while with gamma correct workflow things are just right and plain simple out of box.

    if you get that washed out approach you could just set output gamma to 1 after all
Sign In or Register to comment.