Announcement

Collapse
No announcement yet.

sRGB Vs 2.2 Gamma

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sRGB Vs 2.2 Gamma

    Probably like a lot of people conscious of linear workflow, I've been using Vray's built in color mapping with a 2.2gamma applied to make sure 8bit images are saving in an sRGB color space. What I've noticed though, is that while a 2.2 gamma is really close to an sRGB conversion, it's still off.

    One way to get a perfect sRGB colormapped image is by no gamma correction and saving images in a 16/32bit floating point format (like .exr) and then applying color mapping in a post program. While this is potentially a great way to work, 16/32bit images are also HUGE files that are going to slow down a composite and eat drive space. I only use them when I have to. The other way to get a perfect sRGB image is apply the sRGB switch in the Vray Frame Buffer and saved out the baked image. The sRGB math in the VFB is perfect, but currently you have to save out images one at time.

    What doesn't work is applying color mapping to a saved 8bit image. This can give you terrible banding as it's stretching the histogram. The standard baking in a 2.2gamma also has its draw backs because the math isn't right and it can lead to incorrect brightnesses and washed out colors.

    Is there currently an easy way Vray can apply a true sRGB colormap to a batch render instead of using a linear 2.2 gamma multiply? There might be an easy way to do this that I overlooked. If not, I could recommend a check box under colormapping just called "sRGB" that will automatically apply the same sRGB curve from the VFB and bake it into images.



    For anyone who is curious, A 2.2gamma converstion just applies a power of 2.2 while a true linear <-> sRGB conversion actually looks something more like this:

    def s2lin(x):
    return where(x <= 0.04045,
    x / 12.92,
    pow((x + 0.055) * (1.0 / (1 + 0.055)), 2.4))

    def lin2s(x):
    return where(x <= 0.0031308,
    x * 12.92,
    (1 + 0.055) * pow(x, 1 / 2.4) - 0.055)

  • #2
    Originally posted by hybrid View Post
    Is there currently an easy way Vray can apply a true sRGB colormap to a batch render instead of using a linear 2.2 gamma multiply?
    It's not impossible, certainly. Needs to be thought through a bit more carefully though as it has the potential to make things confusing. Ideally, this should be done as part of 3ds Max itself.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      Thanks Vlado for the response!

      Maya does have the linear to sRGB option built in for both mental ray and it's native software renderer under a Color Management tab, but it becomes inaccessible when rendering in Vray.

      One possible option would be to add "sRGB" as a Type under the color mapping drop down, and gray out the dark multiplier/bright multipler/gamma options.
      This could give people a 1 click option to get the accurate sRGB of the Vray frame buffer that they're attempting to get with 2.2 linear gamma baking

      Comment


      • #4
        Originally posted by hybrid View Post
        One possible option would be to add "sRGB" as a Type under the color mapping drop down, and gray out the dark multiplier/bright multipler/gamma options.
        This could give people a 1 click option to get the accurate sRGB of the Vray frame buffer that they're attempting to get with 2.2 linear gamma baking
        Yes, that makes sense. Will make a note to look into it. Might be a chance to remove some of the other options that no-one uses too.

        Best regards,
        Vlado
        I only act like I know everything, Rogers.

        Comment


        • #5
          A little update on the topic.

          In the latest official 3.00.01 version the sRGB option from VFB is not taken into account when rendering via Batch Render and the sRGB profile will not be baked into the output image - this has been fixed for the next official release.

          The sRGB profile will be saved only for sRGB color space file types like JPG,PNG etc and it will not be saved for Linear color space types like EXR,HDR,TIFF etc.
          Svetlozar Draganov | Senior Manager 3D Support | contact us
          Chaos & Enscape & Cylindo are now one!

          Comment


          • #6
            Thanks guys!

            Comment

            Working...
            X