Announcement

Collapse
No announcement yet.

50% gray in LWF = 49 or 128?

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

  • 50% gray in LWF = 49 or 128?

    From what I have read so far, I thought that 50% gray would use 128 in the color picker for linear work flow, and I thought that this would correspond to 0.5 0.5 0.5 float. Now I just read an old thread from CGarchitect, where it is explained that 49 gray would represent 50% gray (because of the gamma curve).

    http://www.cgarchitect.com/vb/18876-...mma-space.html

    I assume this is correct, but I don't fully understand. I thought that in a linear color system, 50% gray would be numerically in the middle between "black" and "white".

    Also, what would be the correct way to make 50% gray using VRayColor. Would it be 0.5R, 0.5G, 0.5B, 1.0Mult Float, or something else?

    I am trying to get started using LWF, and I always like to do my initial lighting using a 50% gray override material. This way I know that the model is properly lit, before I start creating materials.

    Thanks for the help!
    Tim

  • #2
    White in LWF = 115 (255/2.2)
    Grey in LWF = 58 (128/2.2)

    Comment


    • #3
      Yes, I'm also very confused about the use of vraycolor. I actually did some basic tests and it turned out that vraycolor doesn't have any effect on my render. For eg : I create 2 materials A and B with the following parameters :

      Material A : diffuse slot : color R:128 G:128 B:128
      Material B : diffuse slot : VrayColor map R:0.5 G:0.5 B:0.5 (gamma 3dsmax 2.2)

      If I render two spheres with these materials they look exactly the same. Shouldn't the one with material A be 2.2x darker ??

      Note : the gamma/lut preferences are set to affect color selector and material editor. Maybe this explains my results. But then it would mean that with these settings, it is pointless to use the VrayColor map. Right ?

      mekene

      Comment


      • #4
        The relationship between the colour of a pixel before and after gamma correction is a power curve.

        So if the red component has a value of 0.5 before gamma correction is applied the value afterwards will be 0.5^(1/2.2) = 0.73.

        If you want to know what value to give a pixel in a gamma 1.0 image so that it will give you a certain value when gamma curve is applied then you need to work backwards from this. If you want a value of 0.5 in your gamma 2.2 image then the value in the gamma 1.0 image needs to be 0.5^2.2 = 0.218. This roughly works out at RGB 55,55,55.
        Dan Brew

        Comment


        • #5
          Thats strange, cause Im sure Vlado said that when using 2.2 gamma the rgb value of white was around 153 rgb... Thats what ive been using as my reference value.
          Regards

          Steve

          My Portfolio

          Comment


          • #6
            Thats strange, cause Im sure Vlado said that when using 2.2 gamma the rgb value of white was around 153 rgb... Thats what ive been using as my reference value
            I'm not sure what he meant by that. As I understand it, when you change the gamma of an image the black and white points stay the same, it's the colours in between that change. If you open an image in photoshop and slide the gamma up and down blacks stay black and whites stay white.

            Dan
            Dan Brew

            Comment


            • #7
              Originally posted by DanielBrew View Post
              when you change the gamma of an image the black and white points stay the same, it's the colours in between that change.

              Dan
              as far as I know
              black - 0 = 0
              gray - 128 = 55
              white - 255 = 255

              so I agree

              but any further clarification is welcome!
              Alessandro

              Comment


              • #8
                Originally posted by stevesideas View Post
                Thats strange, cause Im sure Vlado said that when using 2.2 gamma the rgb value of white was around 153 rgb... Thats what ive been using as my reference value.
                hmmm, I can't find the post yet, but I thought he said 135?
                Vlado? Anyone?

                Comment


                • #9
                  Yes, I believe zeronove is right. Look at the curve - it tells you everything. 0, and max points didn't change, only the middle did. So you can't use linear calculations and divide everything by 2.2 since it's not a linear curve but an exponential one, or a "power curve", not sure if that's the english translation of how we say it.
                  www.hrvojedesign.com

                  Comment


                  • #10
                    Using the VrayColor map as a kind of calculator and flipping gamma on and off gives these results (percentage/2.2 gamma corrected/linear):

                    0% = 0 = 0

                    25% = 64 = 12

                    50% = 128 = 56

                    75% =192 = 137

                    100% = 255 = 255
                    Last edited by stef.thomas; 25-11-2008, 05:00 AM.
                    Check out my models on 3dOcean

                    Comment


                    • #11
                      Originally posted by theedge View Post
                      Yes, I'm also very confused about the use of vraycolor. I actually did some basic tests and it turned out that vraycolor doesn't have any effect on my render. For eg : I create 2 materials A and B with the following parameters :

                      Material A : diffuse slot : color R:128 G:128 B:128
                      Material B : diffuse slot : VrayColor map R:0.5 G:0.5 B:0.5 (gamma 3dsmax 2.2)

                      If I render two spheres with these materials they look exactly the same. Shouldn't the one with material A be 2.2x darker ??

                      Note : the gamma/lut preferences are set to affect color selector and material editor. Maybe this explains my results. But then it would mean that with these settings, it is pointless to use the VrayColor map. Right ?
                      The vraycolor map does make a difference, it applies an inverse gamma curve to the color value making it darker. Then when the gamma correction is applied to the final image the object should resemble the colour you inputted at the start. Actually in your example it is material B which will be darker.

                      Try this: put a vray colour map into a standard material diffuse slot, put gamma correction to 'specify' and '2.2' and a value of 128,128,128 in the colour slot. Now go into the map rollout of the material and turn the map on and off. As you can see without the map turned on the material is brighter and therefore would come out too light in the final gamma corrected image.
                      Check out my models on 3dOcean

                      Comment


                      • #12
                        If you read the vray documentation it states that the vray gamma only affects the material slot but not the rendered state of the material. Im assuming this is so you can select a colour, tick the gamma correction and then find out what the equivalent rgb values are for that gamma corrected colour. Then you just copy the rgb slot, turn off gamma and paste that colour back into the rgb slot...hey presto, your gamma corrected colour that is rendereable too...tell me if im wrong...
                        Regards

                        Steve

                        My Portfolio

                        Comment

                        Working...
                        X