POV-Ray : Newsgroups : povray.general : strange problem with srgb color in light_source : Re: strange problem with srgb color in light_source Server Time
14 May 2024 00:31:48 EDT (-0400)
  Re: strange problem with srgb color in light_source  
From: Kenneth
Date: 2 Apr 2021 12:55:00
Message: <web.60674b20a9b7c959d98418916e066e29@news.povray.org>
Ive <ive### [at] lilysoftorg> wrote:
>
>
> Just to make it clear - as I have the impression you do misunderstand
> the srgb keyword:
> it is NOT about rgb-to-srgb conversion, it is the
> other way around. The srgb keyword is for converting a given sRGB color
> value to a linear RGB color.

Yes, I could have it backwards, although I think I know what you're saying; it
may simply boil down to my own 'comfortable interpretation' of the general idea,
and how I personally think of srgb's use: essentially darkening a given rgb
color (as a simplistic way of describing the *visual* effect). That to me means
"rgb-to-srgb conversion" (whatever the math actually describes), and is most
likely not a technically accurate way of looking at it. I do know that POV-ray
has to operate on *linear* colors internally.

In a good way, your comments have forced me to re-think the entire gamut of
colors, gamma etc., and what may be some misconceptions I have in an even wider
sense. I need to formulate a more detailed response, once I work it all out. For
me, these gamma-related discussions continue to be a brain-twister.

Regarding srgb itself and its *visual* effect on colors, it seems to me that
POV-ray's section on the topic at 3.3.1.7.2 (at least in the built-in version of
the docs) is more about the technical workings of the srgb process *under the
hood* than a more user-friendly description of its visual effect. Every time I
re-read it, I come away thinking that it means exactly the opposite of what I
'see' in a render. Maybe Clipka's discussion of it there will finally 'click'
with me, at some point. I hope so.
>
> > Long ago, either you or Clipka had given a different kind of example of this,
> > but used an rgb value of something like
> >             rgb <104,230,75>/255
> > and then warned about naively converting that to srgb with a simple
> >            srgb <104,230,75>/255
> >
>
> ...Quite the opposite: this is exactly what the srgb keyword was
> meant for. You have a byte values (either from a color picker or from
> some web color), and the division by 255 transforms this byte value into
> the 0..1 range. The result is still a sRGB value and prefixing this with
> the srgb keyword simply tells POV-Ray to treat it as such and internally
> converts it to a linear RGB value.
>
Ah! Thanks to you (and Cousin Ricky too) for explaining this. I'm beginning to
finally 'see the light' as to what the difference is between, say, srgb
<.7,.8,.9>*.4 and srgb <104,230,75>/255.  It's a minor 'eureka' moment for me,
and clears up one of my sticky misconceptions.

Btw, I can't presently find the reference to that "different kind of example" I
gave; I know I saw it somewhere, but it seems that I got the meaning completely
wrong.


Post a reply to this message

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