what is Gamma Correction

SertorialSertorial Posts: 960
edited December 1969 in New Users

in the 3Delight settings I have something called gamma correction. Should this be on or off and what should gamma be set to?

«134

Comments

  • ChoholeChohole Posts: 32,219
    edited December 1969

    If you are up to a long explanation of gamma correction http://www.cgsd.com/papers/gamma_intro.html

  • frank0314frank0314 Posts: 10,821
    edited December 1969

    I don't have Gamma correction turned on

  • prixatprixat Posts: 1,175
    edited December 1969

    I have GC switched on and set to 2.2

    It helps to have your monitor calibrated, at least vaguely.

    What it means in practice is, you generally need less light in your scenes.
    The detail in occluded areas will be more visible.
    If you have highlights they won't have a colour shift.
    Changes you make to lighting will be more predictable/controlable.

  • SertorialSertorial Posts: 960
    edited June 2014

    cool. Thanks everyone. I shall read with interest (I love nerdy stuff) and I shall switch on gamma to 2.2.

    Post edited by Sertorial on
  • SzarkSzark Posts: 10,592
    edited June 2014

    What a GREAT simple explanation prixat.

    I have mine permanently ON and set to 2.20

    Post edited by Szark on
  • SzarkSzark Posts: 10,592
    edited December 1969

    my understanding of WHY gamma correction started with this http://www.daz3d.com/forums/discussion/18364/P120/#555356 and went on some pages after. Mustakettu85 help was the key that made that understanding clear. It takes a while to read it all but for me the process of how I got there with help was instrumental in getting the full picture on Gamma correction.

  • Richard HaseltineRichard Haseltine Posts: 61,060
    edited December 1969

    The gamma value will be used for your renders regardless of the button - the button turns on correcting the images, which were probably created with a gamma of 2.2, so that they don't get adjusted a second time and washed out. So if you use a Gamma value other than 1.0 you almost certainly want the button set to on, but there may be rare occasions when you don't.

  • ChoholeChohole Posts: 32,219
    edited December 1969

    That's one thing I do envy you for in DS, the option to vary Gamma correction. In Bryce it is either on or off, no way of varying it that I know of.

  • SertorialSertorial Posts: 960
    edited December 1969

    The gamma value will be used for your renders regardless of the button - the button turns on correcting the images, which were probably created with a gamma of 2.2, so that they don't get adjusted a second time and washed out. So if you use a Gamma value other than 1.0 you almost certainly want the button set to on, but there may be rare occasions when you don't.

    Now I am totally confused? What do you mean by the distinction between "images" and "renders"?

  • SzarkSzark Posts: 10,592
    edited December 1969

    texture images/maps I think Richard means as many maps have been Gamma corrected at the making. Gamma correction tries to reverse this by reducing the gamma a lot and reapplying the gamma of 2.20. This is all explained in that thread I linked....eventually. LOL

  • pwiecekpwiecek Posts: 1,214
    edited June 2014

    I don't really use or understand it (yet), but I do know that if you're having trouble with transmapped hair looking too thin, you need to reduce the Gamma on your transparencies.

    The easy way: Turn gamma correction off til you understand what its doing.

    The hard way: Take the global gamma setting (2.2 by default) and apply its inverse (0.45) to all your bump, displacement & (especially) trans channels.

    This is a Poser answer and may or may not be true in DS.

    Post edited by pwiecek on
  • RuphussRuphuss Posts: 2,364
    edited December 1969

    Frank0314 said:
    I don't have Gamma correction turned on

    I have

  • prixatprixat Posts: 1,175
    edited June 2014

    pwiecek said:
    ...Take the global gamma setting (2.2 by default) and apply its inverse (0.45) to all your bump, displacement & (especially) trans channels.

    This is a Poser answer and may or may not be true in DS.

    "Applying the inverse" is what Gamma Correction does in DS so you don't have to do it externally or 'within the shader' as BB does or with the equivalent of Snarlygribbly's scenefixer script.

    The gamma is corrected to a linear space (gamma 1.0) because that's what all renderers work in.

    This only applies to textures, you should not 'correct' bumps etc. I'm pretty sure that applies even in Poser!!! :-)

    Post edited by prixat on
  • ZarconDeeGrissomZarconDeeGrissom Posts: 5,364
    edited June 2014

    So after sifting threw that other thread-tree (thanks Szark), I get the firm point that RGB space is preferred over some other color-space. As monitors, printers, etc All work in RGB color-space. Linear brightness curve, not logarithmic.

    is Gama 1.0, RGB color-space, by default then?
    why is everyone trying to do something with there computer monitors, it was never designed to do?
    (edit)
    When you convert a linear scale value to a logarithmic one, then try to save that logarithmic value with a linear image format, you lose detail. Same with the inverse. It's been a DAC/ADC war in the audio world for quite some time now.

    Post edited by ZarconDeeGrissom on
  • prixatprixat Posts: 1,175
    edited December 1969

    I think you've misunderstood that some where along the line, The only time anything needs to be linear is in the renderer. :coolsmile:

    Everywhere else its non-linear, cameras, monitors, scanners, tv.

    You 'correct' maps for the renderer to do its calculations accurately then convert back to human viewable 2.2 for the resulting image.

    The value proposed in the sRGB standard (roughly 2.2) is quite close to the human eye's non-linearity.

  • Richard HaseltineRichard Haseltine Posts: 61,060
    edited December 1969

    The problem is that the monitor isn't Gamma 1 - it's usually around Gamma 2.2, if calibrated, or may be more extreme with factory defaults. That's why, when a texture image is made to look right on screen it effectively embeds a Gamma 2.2 that needs to be removed before rendering with the render gamma set to anything other than 1.0

    Gamma not 1.0 in render Settings - turn Gamma Correction on or the textures will be over-bright.

    In DS, if your control maps - bumps, opacity or the like - are being changed by gamma correction go to the Surfaces pane, find a surface with the map applied, click the texture preview square next to the slider the map is applied to and select Edit, then set the gamma to 1 (to tell DS this image does not need correction). However in regular shaders DS should be leaving control maps alone anyway - problems are most likely in Shader Mixer shaders where the map's purpose is unclear. One problem is that a single map can have only one gamma value, even if it is used in multiple places, so if (as sometimes happens) a map is used both for diffuse (colour, probably needs gamma correction) and bump (control, probably set to work with the uncorrected values and not affected by render gamma) you will face a dilemma over which setting to use.

  • ZarconDeeGrissomZarconDeeGrissom Posts: 5,364
    edited June 2014

    All I know is when I take a picture of a rock sitting right here, cut up the photo into tiles for a floor mosaic, and spit it threw daz studio, it all looks just like the rock on the floor right here. I don't need to gamma correct anything.

    I messed with the gamma slider in other image software, and all it seams to do is mess with the logarithmic curve of the values between 0 and 255 (for 24bit BMP as example).

    When you want all the detail you can get from your texture files, taking half your values and tossing them in with the others at the other end of the scale is a bad thing to do. you might as well use a lossy compression with the quality slider at nill.

    Post edited by ZarconDeeGrissom on
  • Richard HaseltineRichard Haseltine Posts: 61,060
    edited December 1969

    One of the benefits of using gamma correction in the renderer is that you aren't correcting post-render, and so losing image quality as you note.

  • ZarconDeeGrissomZarconDeeGrissom Posts: 5,364
    edited December 1969

    lol, there I agree. That other thread, there talking about applying the gamma to the diffuse mats first, then loading them into studio with a counter Gamma correction using "Image Editor...", etc, etc.

    How many times can you Gamma Correct something in every step along the way, before you only have two colors left, lol.

  • Mustakettu85Mustakettu85 Posts: 2,702
    edited December 1969

    lol, there I agree. That other thread, there talking about applying the gamma to the diffuse mats first, then loading them into studio with a counter Gamma correction using "Image Editor...", etc, etc.

    How many times can you Gamma Correct something in every step along the way, before you only have two colors left, lol.

    Reiterating:

    The "Image Editor" is but a handy function within DS that tells tdlmake (the utility preparing all the textures to be used in 3Delight) to treat maps as linear (gamma "1") or requiring a de-gamma (gamma "0"). Linear is for control maps, the "strength" ones (bump, displacement, opacity, specular _strength_ etc). De-gamma is needed for all the colour maps unless they are HDR (already internally linear).

    Generally, DS guesses the correction value well. But not all the time. So it is a good habit to check manually before rendering, if you have loaded any material presets (even those you saved yourself).

    The renderer, internally, "thinks" in linear space. By default, it will output in linear space. But this linear space is not the way our eyes see the world. You sure can correct the render to 2.2 later (if your inputs were in correct space), but if you use the "Render to a new window" mode, you will need to do the "save file - correct - view" routine all the time to really see the result. So setting gamma to 2.2 in DS is a time-saver.

    More links to help internalise the concept:
    http://www.pixsim.co.uk/downloads/The_Beginners_Explanation_of_Gamma_Correction_and_Linear_Workflow.pdf
    http://filmicgames.com/archives/299
    http://www.vfxwizard.com/tutorials/gamma-correction-for-linear-workflow.html

    Get the best out of your monitor, if you are not using any real calibration devices:
    http://quickgamma.de/indexen.html

    In my experience, if you have trouble reading long sequences of black text on white background on your monitor, the chance that your monitor needs adjustment is fairly high. A lot of the time the factory settings are overly bright. Integrated video controllers (think Intel chips) are also wacky about colour management. If your computer has two video cards - an intergrated chip and a good one - it won't hurt to set the good one to be the default one.

  • SertorialSertorial Posts: 960
    edited December 1969

    I literally have no clue what any of you are talking about!

    I was just asking if I should have the gamma correction in the render settings switched on or off. Some of you say one and some of you say another.

    As far as I understand it, gamma is something to do with how contrasty your monitor is, so I would have thought that you just needed to adjust your monitor to get colours showing correctly? I am not really clear on why a renderer needs to worry about gamma?

  • SzarkSzark Posts: 10,592
    edited December 1969

    ok make it simple for realism I say ON at 2.20 for any else keep it at default.

    With that discussion in my HSS thread I linked to earlier I learnt that Gamma Correction ON at 2.20 lets the surfaces, providing the surfaces are advanced shaders designed for more realism, react to realistic light that have an inverse square law light fall off.

  • ZarconDeeGrissomZarconDeeGrissom Posts: 5,364
    edited June 2014

    So sorry Szark, and Sertorial. I never intended to get people rallied up over a concern of loosing detail.

    It's like measuring in feet or meters, when adding up the length of two things. So long as you keep both lengths the same type of measurement (feet or meters), you will get the correct result. It's when you start to try to add feet to meters, that things get sticky. (if not completely lost in space)

    yes, leave Gama correction Off, and Gama at 1.0. it's the simple way.
    Yes, Gama correction On, and Gamma set to 2.2, (Were converting everything to meters, then adding it all up, then putting it back to whatever it was before on the output)
    Anything else should be avoided, unless you really know what your doing.


    "Inverse-square law", light from a bulb. The further away from the bulb, the more spreed out the energy is. Think the skin of a balloon, the bigger you make the balloon, the thinner the rubber skin of the balloon gets. "one over R" AKA One divided by the Radius, is another way to say the same thing.

    Post edited by ZarconDeeGrissom on
  • SzarkSzark Posts: 10,592
    edited June 2014

    rallied me, not often. No need to apologise. All you seek is understanding and that is cool by me...you carry on. ;)

    oh the inverse sq law...yeah something like that ;) I know what it is in my head and understand that there is a real world formula that applies to all light. Explaining it in real simple terms, as I like it to be, is somewhat difficult for me.

    Post edited by Szark on
  • Mustakettu85Mustakettu85 Posts: 2,702
    edited December 1969


    yes, leave Gama correction Off, and Gama at 1.0. it's the simple way.

    And it's also simply the wrong way. Unless you're aiming for a "dated CG" sorta look or are _that_ oldschool and _that_ proficient with tricks'n'hacks so that you just cannot fathom adapting to the 21st century =))) Or if you are already linearising your inputs by hand.

    Really, I think GC is on by default in Poser now, it would probably be reasonable to have it on by default in further versions of DS... one less reason for Poser users to mistakenly believe that Firefly is superior to 3Delight.



    "Inverse-square law", light from a bulb. The further away from the bulb, the more spreed out the energy is. Think the skin of a balloon, the bigger you make the balloon, the thinner the rubber skin of the balloon gets. "one over R" AKA One divided by the Radius, is another way to say the same thing.

    Radius squared. One over R is linear falloff.

  • Mustakettu85Mustakettu85 Posts: 2,702
    edited December 1969

    Sertorial said:

    As far as I understand it, gamma is something to do with how contrasty your monitor is, so I would have thought that you just needed to adjust your monitor to get colours showing correctly? I am not really clear on why a renderer needs to worry about gamma?

    It's you who needs to worry about it =) Monitor gamma simply defines what colour space the linear output of the renderer should be converted to for it to be displayed correctly. GC on handles the linearising of the inputs so that the renderer sees them correctly, in turn; gamma of 2.2 makes the render "fit" your monitor. If you do want to understand the mechanics, please read the linked materials from my post above.

  • ZarconDeeGrissomZarconDeeGrissom Posts: 5,364
    edited December 1969

    lin vs log. keeping in mind that computers don't have half bits, or tenths of a bit, it's either one or zero resulting in integers.

    so a four bit number can only represent a number from 0 to 15 (0 to F in hex), the scale can matter a lot when saving files. I hope this pic can help Sertorial understand the confusion a tad bit more.

    LinLogScl005.png
    528 x 250 - 6K
  • ZarconDeeGrissomZarconDeeGrissom Posts: 5,364
    edited December 1969

    Mustakettu85, Are you sure all I have to do is set Gamma to 2.2 for the output, with gamma correction on? I'll post the result once it is done rendering.

  • Mustakettu85Mustakettu85 Posts: 2,702
    edited December 1969

    Mustakettu85, Are you sure all I have to do is set Gamma to 2.2 for the output, with gamma correction on? I'll post the result once it is done rendering.

    Yes, this is the magic trick. And just in case DS misunderstood something, check the gamma correction values on your materials: colour maps at "0", control maps at "1". Don't use the same map in incompatible roles, like colour and strength (rename the second instance in the Multi-Layered Image Editor).
    You may also need to tweak the lighting, but these will be tweaks for the greater good.

    "Save the reputation of the hobbyist render scene, do everything like the pros" =)

  • ZarconDeeGrissomZarconDeeGrissom Posts: 5,364
    edited June 2014

    you talking about this package?
    http://www.daz3d.com/multi-layered-image-editor
    I don't have that.

    Also...
    if you use the “Render to a new window” mode, you will need to do the “save file - correct - view” routine
    is that one of the buttons on this Render (1/1)window?

    Post edited by ZarconDeeGrissom on
Sign In or Register to comment.