Gamma Correction...

evilded777evilded777 Posts: 2,442
edited December 1969 in Daz Studio Discussion

Ok, so what's the proper usage of GC in Studio 4.6?

From what I know (and damn, I thought Studio had it built in previous to this), I want GC on and the gamma setting ought to be 2.2. Or is that Poser specific and I am carrying around half-understood notions?

Setting of 2.2 with GC on just overamps EVERYTHING. I gotta turn down all my lights just to get close to what I was looking at previously.

Comments

  • SpottedKittySpottedKitty Posts: 7,232
    edited December 1969

    I think a lot depends on whether your graphics controller already has a gamma function, and it's enabled and properly adjusted. Some do, some don't, even in modern systems. There was also an issue (no idea if it still is one) where a Mac system needed a different gamma adjustment than a Windows system. Try looking at your Control Panel widgets for Colour Management or for your graphics controller to see if there's anything there that can be tweaked.

  • evilded777evilded777 Posts: 2,442
    edited December 1969

    No offense intended, Spotted Kitty, but I don't think so.
    Gamma Correction in 3D Rendering

    You are talking about something else entirely.

  • SpottedKittySpottedKitty Posts: 7,232
    edited December 1969

    Ah, OK, looks like I was thinking "monitor gamma" instead of "image gamma" — I've bookmarked that link, it looks interesting, I'll have another read tomorrow when I'm less than half asleep. Sorry about the confusion.

  • Richard HaseltineRichard Haseltine Posts: 97,254
    edited December 1969

    There was a GC setting previously, but there was no way - in regular shaders - to remove the GC from textures so everything that used a map ended up washed out. What's new is the ability to tell DS what GC was used to create the texture, so that it can be reversed out before rendering with GC set. By default control maps (opacity, bump etc.) assume a gamma of 1 and diffuse maps 2.2 (at least for most formats, the value is actually set to 0 which tells DS to apply its best guess). A new entry appears in all of the image drop-downs, Image Editor, which allows you to set the gamma for that image if you want or need to override the default behaviour.

    Older scenes and material settings may need adjusting - point lights actually work now, so a scene with point lights that had been turned up to work before will now be grossly over-lit, and SSS may need to be toned down too.

  • millighostmillighost Posts: 261
    edited December 1969

    Ok, so what's the proper usage of GC in Studio 4.6?

    From what I know (and damn, I thought Studio had it built in previous to this), I want GC on and the gamma setting ought to be 2.2. Or is that Poser specific and I am carrying around half-understood notions?

    Setting of 2.2 with GC on just overamps EVERYTHING. I gotta turn down all my lights just to get close to what I was looking at previously.


    DS has two items in the render settings that have to do with GC. The "Gamma Correction" On/Off switch, and the Gamma slider. Those two are independent of each other (which is a difference to Poser, where the gamma value affects the On/Off).
    The Gamma On/Off affects how DS interprets colors textures in particular. If it is set to On, DS guesses if your textures are gamma encoded and decodes them while reading. I am not sure how it guesses, but it usually does a very good job with it, i.e. Bump Maps are not decoded, diffuse maps are decoded and so on. If they are decoded the gamma value used is 2.2, which is virtually always right, at least since the last 10 years. You can overwrite this guess, like Richard wrote above. So generally you should set it to "On". It does not usually make your images brighter, in fact they will get darker in most cases.
    In contrast, the Gamma slider affects the exposure setting of the render, which means the output of the render (the image) is gamma corrected as a last step in the rendering. If you set this higher than 1, it will make your image brighter (overamps everything in your case). There is no general rule to do that or not, because it depends on what you want to do with the image after the render. If you want to see it on screen (and your screen is more or less calibrated to sRGB like most screens are) you should set it to 2.2. Same, if you want to post it on the internet where it is to be watched by others whose screens are more or less like sRGB. But another very common deed people like to do to their renders is composite them in a downstream program, most notably Photoshop, GIMP and the like. Then it is actually easier to leave the Gamma slider at 1 and do the Gamma correction after the compositing. But there is a caveat: Photoshop and GIMP use so called "color management", which is similar to gamma correction, only more complicated. And because it is so complicated, people tend to not mess with it and leave it at the default setting. But the default setting is to use an internal profile of sRGB which is not particularly suitable to composite linear renders, but there you are.
    The last part is true, however, you will need to turn down the lights when using an output Gamma of greater than 1 (but i see it the different way: when using an output gamma of 1, you will have to turn up the lights, sometimes by a very big amount, especially falloff lights; if you ever tried to use a pointlight in DS, you will already have noticed that).
  • evilded777evilded777 Posts: 2,442
    edited May 2013

    Thank you Richard and millighost for clearing that up for me. I did not realize that the switch and the slider were not intrinsically linked.

    We need better documentation!

    //edit, I really should have read millighost's post a little closer. Now I am a little more troubled, as I did indeed have the interpretation correct for usage. I don't do my gamma in post (apparently, with Studio I haven't been doing and gamma correction up to this point, and that does explain some things!), so I want to use both the switch and the slider.

    I do like to learn things. Thanks for elucidating this, and pointing out I had more to learn. I will need to learn about gamma corr in post as well so I truly know what I am doing.

    and I don't think that is an accurate description of Poser's GC, millighost, not to split hairs. Poser has the same sort of controls: on/off switch, a gamma adjustment and a value for the textures; so I'm going to say that the function is actually similar. But that may be from a more simplified, end-user perspective, and not from someone who ACTUALLY knows what they are talking about when it comes to functionality.

    Post edited by evilded777 on
  • evilded777evilded777 Posts: 2,442
    edited December 1969

    Ah, OK, looks like I was thinking "monitor gamma" instead of "image gamma" — I've bookmarked that link, it looks interesting, I'll have another read tomorrow when I'm less than half asleep. Sorry about the confusion.

    No problem Spotted Kitty, thanks for contributing to the conversation.

  • BejaymacBejaymac Posts: 1,851
    edited December 1969

    The attached pic is a quicky using adams pure white UE2 set, I use it for testing material/shader settings, in my render settings Gain is 1.00 as is Gamma, with GC turned on. The torso map has had it's GC adjusted to 1.00 with the built in image editor, the higher the value you use here then the darker the image becomes, so 2.2 is pretty much what the other diffuse textures are at as they haven't been altered.

    GC_01.jpg
    409 x 647 - 88K
  • millighostmillighost Posts: 261
    edited December 1969

    ...

    and I don't think that is an accurate description of Poser's GC, millighost, not to split hairs. Poser has the same sort of controls: on/off switch, a gamma adjustment and a value for the textures; so I'm going to say that the function is actually similar. But that may be from a more simplified, end-user perspective, and not from someone who ACTUALLY knows what they are talking about when it comes to functionality.


    No, i was referring to DS's gamma correction. The difference between Poser and DS is what happens if you do NOT specify a gamma for a texture separately;
    in DS textures are decoded always with a gamma of 2.2, the render is encoded with the gamma value from the render settings.
    in Poser textures are decoded with the gamma from the render settings, which is also used to encode the render.

    So when you want to do your GC in post:
    in DS you enable GC, but set the slider to 1.
    in Poser you enable GC, and set the value to 1, but you must go through all materials and explicitly change the gamma to 2.2 (very inconvenient, IMO). (As an alternative, you can set the gamma to 2.2, but then save the image in an HDR format, which automatically uses 1 for gamma)

  • pwiecekpwiecek Posts: 1,542
    edited May 2013

    My understanding, in poser at least, is that gamma compensates for the brightness of your textures not being linear. If you applied gamma globally and applied its inverse to every texture you would end up doing a lot of work that would cancel itself out. The washing out is caused when the gamma is applied to the transparencies. I had a terrible time with hair being too thin because of this. Applying the inverse Gamma to the TRANSPARENCIES is what you want to do. (There is a similar problem with bumps or displacements or both but I could never see the effect).

    This whole subject is calld "Linear Workflow"

    The monitor gamma has to do with how "Hot" a pure white texture is.

    Post edited by pwiecek on
  • Richard HaseltineRichard Haseltine Posts: 97,254
    edited December 1969

    Gamma is the relationship between input values (the RGB values sent to the screen, or in the texture or render output) and the final colour that you see on screen or that is output to the render file. Monitors don't try to be linear (input=displayed output) because the human eye isn't linear - we can't distinguish dark tones as well as light tones - so it makes sense to use more input colours for the lighter values than for the dark (essentially gamma correction, with a positive value, stretches the darks up into the middle, leaves the middle unstretched but moved lighter to make room for the stretched out darks, and compresses the very light values - meaning fewer input values give dark colours, where the bigger steps won't be perceived, and more give light colours, where they will provide smaller steps between colours and so smoother looking images).

  • rassahahrassahah Posts: 3
    edited December 1969

    Gamma is the relationship between input values (the RGB values sent to the screen, or in the texture or render output) and the final colour that you see on screen or that is output to the render file. Monitors don't try to be linear (input=displayed output) because the human eye isn't linear - we can't distinguish dark tones as well as light tones - so it makes sense to use more input colours for the lighter values than for the dark (essentially gamma correction, with a positive value, stretches the darks up into the middle, leaves the middle unstretched but moved lighter to make room for the stretched out darks, and compresses the very light values - meaning fewer input values give dark colours, where the bigger steps won't be perceived, and more give light colours, where they will provide smaller steps between colours and so smoother looking images).

    Um, yes, except that it is exactly the other way around. Humans can distinguish better between darker values than brighter values. Therefore, with gamma correction a half-bright pixel (50% light energy) is assigned a pixel value of 186 (of a maximum of 255). That leaves 185 different values for the darker 50%, and only 69 different values for the brighter 50%. I did not understand the part with the stretching and making room, but essentially it is to be like this: Richard is able to see that a 5 watts light bulb is brighter than a 4 watts light bulb, but probably cannot see that a 100 watt light bulb is brighter than a 99 watt light bulb, even though the difference is the same.
  • Richard HaseltineRichard Haseltine Posts: 97,254
    edited December 1969

    Well it's entirely possible that I had the wrong end of the stick - but applying a gamma of 2.2 does lighten an image over all, and looking at the Histogram in PS after applying Gamma 2.2 it does stretch out the dark values (leaving gaps) and compress the brights (piling values up) so if we are more sesnsitive to darks applying positive gamma correction should create at least a slight posterisation effect in the darks.

  • Richard HaseltineRichard Haseltine Posts: 97,254
    edited December 1969

    As for what I meant about contrast, whether my basic understanding was right or not, this grab of a positive gamma adjustment in PS' Curves dialogue illustrates it - the darker tones are spread over more of the output range (increased contrast) and the lighter tomes less (decreased contrast).

    Gamma-contrast.JPG
    501 x 591 - 53K
  • evilded777evilded777 Posts: 2,442
    edited December 1969

    Gonna resurrect this thread a bit.


    If I wanted a properly gamma corrected render using the scripted 3Delight render, or rendering to a rib and then with the stand-alone 3Delight.... could I do either of these via the Studio interface?

    Seems like if I set the gamma on all my diffuse maps, then set the gamma slider in the render settings, that the scripted renderer ought to behave the way I am want.

    What about using Draagonstorm's batch render plugin to get to the standalone 3Delight? Would it work similarly?

    Am I totally off-base here with my assumptions?

    THANKS!

  • SpottedKittySpottedKitty Posts: 7,232
    edited December 1969

    Seems like if I set the gamma on all my diffuse maps, then set the gamma slider in the render settings, that the scripted renderer ought to behave the way I am want.

    No, what it'll do is double up the gamma setting. You only need to set the Render Settings parameter, that automagically applies the gamma value to each diffuse texture as your render runs.
  • evilded777evilded777 Posts: 2,442
    edited December 1969

    Spotted Kitty, seems like we never agree :) We have to do something about that.

    But I could be wrong here.

    If I use the scripted renderer, I do not have access to the Gamma Correction On/Off switch, which is why I think I need to set the gamma on the textures individually.

    But it is abundantly clear to me that I do not know entirely how that switch works, and under what conditions it works. Behavior seems bizarre to me.

  • Richard HaseltineRichard Haseltine Posts: 97,254
    edited December 1969

    The switch tells DAZ Studio to reverse out the gamma on the images, if it isn't 1 (or 0 and in a place that 1 will be assumed). That is done, as far as I know, by TDLMake (certainly changing the value causes the optimisation to be rerun for the affected images).

Sign In or Register to comment.