POV-Ray : Newsgroups : povray.binaries.images : Another of Gamma's Smoking Guns Server Time
7 Nov 2024 04:53:21 EST (-0500)
  Another of Gamma's Smoking Guns (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: clipka
Subject: Another of Gamma's Smoking Guns
Date: 24 Dec 2016 04:47:16
Message: <585e4424@news.povray.org>
This is actually much simpler:


#version 3.7;
global_settings { assumed_gamma 2.2 }

camera {
  perspective angle 75
  location  <0.0 , 1.0 ,-3.0>
  right     x*image_width/image_height
  look_at   <0.0 , 1.0 , 0.0>
}

light_source { <-3000,3000,-3000> color rgb 1.2 }

plane { y, 0
  pigment { checker srgb 1 srgb 0 }
}

sphere { y*1, 1
  pigment { color srgb <1,0.5,0> }
  finish {
    diffuse albedo 0.9
    specular albedo 0.1 roughness 0.05
  }
}


Note how the effective colour of the sphere is shifted in hue towards
yellow by the highlight, when it really should only be shifted in
saturation and brightness towards white.


Post a reply to this message


Attachments:
Download 'gamma_smoking_gun_2.2.png' (78 KB) Download 'gamma_smoking_gun_1.0.png' (85 KB)

Preview of image 'gamma_smoking_gun_2.2.png'
gamma_smoking_gun_2.2.png

Preview of image 'gamma_smoking_gun_1.0.png'
gamma_smoking_gun_1.0.png


 

From: Stephen
Subject: Re: Another of Gamma's Smoking Guns
Date: 24 Dec 2016 05:02:07
Message: <585e479f$1@news.povray.org>
On 12/24/2016 9:47 AM, clipka wrote:
> Note how the effective colour of the sphere is shifted in hue towards
> yellow by the highlight, when it really should only be shifted in
> saturation and brightness towards white.

That is a more useful illustration for me.
Whilst I could see the differences in your previous examples. They were 
just two similar but different images. (Extreme example discounted.)

-- 

Regards
     Stephen


Post a reply to this message

From: jhu
Subject: Re: Another of Gamma's Smoking Guns
Date: 24 Dec 2016 10:25:00
Message: <web.585e928771b7ed6e194284cc0@news.povray.org>


Post a reply to this message

From: clipka
Subject: Re: Another of Gamma's Smoking Guns
Date: 24 Dec 2016 14:23:31
Message: <585ecb33@news.povray.org>
Am 24.12.2016 um 16:21 schrieb jhu:


I've made no attempt to "un-out-wash" it, so that's not much of a surprise.


Post a reply to this message

From: clipka
Subject: Re: Another of Gamma's Smoking Guns
Date: 24 Dec 2016 14:36:52
Message: <585ece54@news.povray.org>
Am 24.12.2016 um 16:21 schrieb jhu:


Better?


Post a reply to this message


Attachments:
Download 'gamma_smoking_gun.png' (98 KB)

Preview of image 'gamma_smoking_gun.png'
gamma_smoking_gun.png


 

From: jhu
Subject: Re: Another of Gamma's Smoking Guns
Date: 24 Dec 2016 17:45:00
Message: <web.585ef9d071b7ed6e615a0e20@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 24.12.2016 um 16:21 schrieb jhu:

>
> Better?

Significantly. Radiosity?


Post a reply to this message

From: clipka
Subject: Re: Another of Gamma's Smoking Guns
Date: 25 Dec 2016 00:25:01
Message: <585f582d$1@news.povray.org>
Am 24.12.2016 um 23:42 schrieb jhu:
> clipka <ano### [at] anonymousorg> wrote:
>> Am 24.12.2016 um 16:21 schrieb jhu:

>>
>> Better?
> 
> Significantly. Radiosity?

That, and gave the light source a realistic inverse-square-law falloff
while moving it closer.


Post a reply to this message

From: Kenneth
Subject: Re: Another of Gamma's Smoking Guns
Date: 27 Dec 2016 03:25:00
Message: <web.586223fd71b7ed6e883fb31c0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

>
> #version 3.7;
> global_settings { assumed_gamma 2.2 }
>
> ....
>
> light_source { <-3000,3000,-3000> color rgb 1.2 }
>

Hello all! I finally have a new computer (well, a used one, with Windows 7
Ultimate, and a dual-core processor. No more Windows XP, sadly-- that one died.)
I've been away from the newsgroups for several months...

But I digress...

I decided to run your test scene with assumed_gamma 1.0 instead of 2.2, and
noticed something about your use of 'rgb' in the light_source. I changed it to
srgb (which I've started doing in all my v3.7xx scenes, to be 'color-consistent'
with all the other srgb colors I use), and noticed that the scene gets
*brighter.* It's an interesting (and unexpected) effect-- unexpected because,
when substituting srgb colors for rgb (under assumed_gamma 1.0), it usually
causes the lighting/colors to be be somewhat *darker* (as expected, due to the
gamma shift of the color components away from linear.) But in this case, the
result is the opposite-- it's brighter!

I assume this is because the light's intensity is greater than 1.0; but I don't
quite understand why. Is it a natural consequence of the srgb 'gamma curve',
affecting color components above 1.0? (Or maybe above a particular
'intermediate' value between 0.0 and 1.0?)


Post a reply to this message

From: clipka
Subject: Re: Another of Gamma's Smoking Guns
Date: 27 Dec 2016 07:10:39
Message: <58625a3f$1@news.povray.org>
Am 27.12.2016 um 09:21 schrieb Kenneth:

> I decided to run your test scene with assumed_gamma 1.0 instead of 2.2, and
> noticed something about your use of 'rgb' in the light_source. I changed it to
> srgb (which I've started doing in all my v3.7xx scenes, to be 'color-consistent'
> with all the other srgb colors I use), and noticed that the scene gets
> *brighter.* It's an interesting (and unexpected) effect-- unexpected because,
> when substituting srgb colors for rgb (under assumed_gamma 1.0), it usually
> causes the lighting/colors to be be somewhat *darker* (as expected, due to the
> gamma shift of the color components away from linear.) But in this case, the
> result is the opposite-- it's brighter!
> 
> I assume this is because the light's intensity is greater than 1.0; but I don't
> quite understand why. Is it a natural consequence of the srgb 'gamma curve',
> affecting color components above 1.0? (Or maybe above a particular
> 'intermediate' value between 0.0 and 1.0?)

You can think of "srgb C" as (roughly) equivalent to "rgb pow(C,2.2)",
i.e. very roughly squaring the colour value. As you may be aware, the
square of a (positive) value below 1 is an even smaller value, while the
square of a value above 1 is an even larger value.

The sRGB "transfer function" (that's the official technical term) is
indeed designed in such a way that it is neutral for values of 0 and 1,
while adjusting any values in between. Since it was designed for
situations where colours are clipped to this range, no special handling
is provided for larger values, and the effect is reversed there.


BTW, in the nominal region (between 0 and 1) the largest absolute effect
of gamma adjustment is roughly around an sRGB value of 0.5 (a linear
value of about 0.24), while the largest relative effect is near black.


Post a reply to this message

From: clipka
Subject: Re: Another of Gamma's Smoking Guns
Date: 27 Dec 2016 07:22:55
Message: <58625d1f$1@news.povray.org>
Am 27.12.2016 um 09:21 schrieb Kenneth:

> I decided to run your test scene with assumed_gamma 1.0 instead of 2.2, and
> noticed something about your use of 'rgb' in the light_source. I changed it to
> srgb (which I've started doing in all my v3.7xx scenes, to be 'color-consistent'

BTW, there's a caveat when using "srgb" in light sources: To modify the
brightness without affecting the hue, you need to use

    colour (srgb <R,G,B>)*Brightness

rather than

    colour srgb <R,G,B>*Brightness

because the latter would be interpreted as

    colour srgb (<R,G,B>*Brightness)

and in the sRGB world multiplying a colour vector by a constant does
/not/ correspond to an even scaling of the corresponding linear colour
components. (That would work for f(x)=pow(x,2.2), but sRGB gamma is more
complicated than that.)


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.