Announcement

Collapse
No announcement yet.

VRayColor - Fix please

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

  • #16
    one vote for that!
    Surrealismo
    https://www.facebook.com/surrrealismo

    Comment


    • #17
      Hi Vlado, thanks for you really quick answer. However I'm still confused, because setting "color gamma" to 2.2 does not give the result I want, as it then applies a triple correction, it doesn't make sense.

      In fact, I persist, there is something weird in the way the conversion is made between the color picker and VrayColor values.
      As I pointed out, changing the float values for each channel gives the correct conversion in the color swatch, but not the other way around, as the SAME calculation is done both ways, which shouldn't happen.

      Even if the color picker allowed only linear values and not srgb-corrected (so what does it mean if I check "Affect color selectors" in Gamma and LUT settings?), it should then translate a value of 128 to 0.5, which is not the case.
      But still, assuming the color picker is not corrected and expect linear values, why, when I input 0.5 in float values in VrayColor then click on the swatch, is the value displayed as 186? As if each way there was the same gamma correction applied? If I then change 186 to 185 and back to 186, the float value is updated to 0.866 (it was 0.5 at the beginning of the process).

      Let's make it clear with an example :
      1 - My input is Red : 0.5, Blue Green : 1.0 in float values. Then I check the swatch and it displays as 186/255/255 (VrayColor is doing a Gamma correction)
      2 - The SAME swatch is still opened, I only move the red value then back to 186 to update it. Then I check the float value : 0.866 (because the original value is now weirdly ALSO GAMMA CORRECTED by VrayColor, but it already was ?)
      3 - Now, if I follow what you're saying, I should put a 2.2 value in gamma to obtain the logical same color as the first one. But it's not the case. Which is understandable if we look at what operations are made between the swatch and float values (we now have a triple correction : First input as float value (linear) > RGB (gamma corrected) > Float value (gamma corrected again) > Gamma corrected for rendering)

      EDIT : of course it would be great if the color picker made the operation seamless with an option for SRGB or not and built-in conversion to gamma corrected values, but I guess it's a different issue. Here we have a wrong behavior between two types of color inputs and VrayColor IS gamma correcting BOTH WAYS. So there's no way to input RGB values easily, as one should do the calculation by hand, linear or not.
      The color swatch/picker is simply useless in that state, and I still firmly believe it's a bug, as a conversion can't have the exact same formula both ways !

      EDIT 2 : I'm still thinking about what you have suggested, but for it to work, we should assume that :

      - the color swatch input is purely linear (it isn't by default, as 3ds max is gamma corrected and the color swatch displays the exact same color as Photoshop, but well, maybe it's the case behind the scenes ?)
      - the color input from photoshop is then wrong for the color picker and has to be uncorrected at some point
      - the value after conversion from the swatch to the VrayColor float values is simply RGB/255 so the "raw" value is read by VrayColor (and that's not the case as demonstrated, the formula used is (RGB/255)^(1/2.2) instead)

      And only then could we have those "wrong" SRGB values from Photoshop, just scaled between 0 and 1, that need the Color Gamma parameter to tell VRay that these values are, in fact, gamma corrected and to apply the operation RGB^2.2 at rendertime.
      Attached Files
      Last edited by labulle; 01-11-2019, 09:51 AM.

      Comment


      • #18
        In the meantime I'm sharing a little script I made earlier today, it appears in the VRay category in toolbars.
        It creates a VrayColor with the correct float values from a color swatch (operation : (RGB/255)^2.2, so it removes the gamma correction) and puts it in the (opened) Slate Material Editor at [0,0] coordinates (no way to find how to center it in the current view). Feel free to use and modify it if anyone finds it useful.
        Attached Files
        Last edited by labulle; 01-11-2019, 09:29 AM.

        Comment


        • #19
          Originally posted by vlado View Post
          Hm, interesting - I was under the impression that nobody used the gamma rollout.
          Vlado
          heh. it was indeed used.
          Marcin Piotrowski
          youtube

          Comment


          • #20
            Yes, same issue - Vraycolor does not work as before (version 3.6) - gamma correction swatch are gone (newer versions) and setting the gamma value to 2.2 also results in a lighter color.
            My workaround: Apply a inverse gamma of .454 in the color correction map on top of the vraycolor (set to 2.2 gamma vraycolor)

            Painful...
            Visit my blog: http://philipnel77.wix.com/raywire

            Comment

            Working...
            X