POV-Ray : Newsgroups : povray.beta-test : Gamma of interpolated colors in color maps Server Time
29 Jun 2024 06:04:19 EDT (-0400)
  Gamma of interpolated colors in color maps (Message 17 to 26 of 36)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Warp
Subject: Re: Gamma of interpolated colors in color maps
Date: 21 Dec 2010 13:14:53
Message: <4d10ee9c@news.povray.org>
scott <sco### [at] scottcom> wrote:
> That's exactly the sort of thing I was thinking of.  Maybe Warp will 
> argue that the default should be "perceptual" though, and we need a 
> "linear" keyword to revert to the existing behaviour.

  The thing is that most people are used to specifying colors as perceived
by the human eye rather than in watts. For example, doubling the values of
the color components is expected to double the brightness of the color
(iow. eg. 'rgb 0.8' is assumed to be twice as bright as 'rgb 0.4').

  To elaborate, if I have understood correctly, POV-Ray 3.7 has been
changed so that regular color specifications express the power of
luminous radiation (which is called radiant flux, and in physics is
measured in watts) rather than the perceived luminosity as seen by
the human eye. The relation between these two is not linear (but closer
to logarithmic). This means that eg. doubling the radiant flux (ie.
doubling the "wattage") does not correspond to doubling the perceived
luminosity of the color, as seen by the human eye.

  This might correspond more closely to reality when calculating
illumination. For example surfaces reflect a portion of the light they
receive, and this portion is relative to the radiant flux, not to the
perceived brightness. (In other words, if the surface properties and
angle with respect to incoming light is so that it reflects exactly
half of the light it receives, this half is measures in watts, not in
what the human eye perceives as "half bright".) I suppose that at least
in theory this ought to give a more realistic end result for surface
illumination, ie. a result which corresponds more to real life.

  As said, the only problem is that people are accustomed to specifying
colors and color gradients in perceived luminosity, not in watts. This
can and will cause confusion.

  In POV-Ray 3.6 color specifications correspond directly to pixel
component values, and this happens to be close to linear with respect
to the perceived luminosity, and hence 'rgb 0.8' looks about twice as
bright as 'rgb 0.4', and this is what people are accustomed to. Likewise
linear color gradients in POV-Ray 3.6 (which, as said, simply map
directly to pixel values) happen to be close to to perceived linear
brightness, which is also what people are accustomed to.

  "You don't specify perceived brightness anymore, but absolute brightness"
is a rather radical change, and many people will get confused by it,
especially since in most systems (at least those with a gamma of 2.2)
raw pixel values map almost linearly to perceived brightness.

-- 
                                                          - Warp


Post a reply to this message

From: scott
Subject: Re: Gamma of interpolated colors in color maps
Date: 22 Dec 2010 08:54:12
Message: <4d120304$1@news.povray.org>
>    "You don't specify perceived brightness anymore, but absolute brightness"
> is a rather radical change, and many people will get confused by it,
> especially since in most systems (at least those with a gamma of 2.2)
> raw pixel values map almost linearly to perceived brightness.

Just tell them to use the srgb keyword, as it uses the same colour space 
as the web, MS Office, Paint etc.  rgb should be reserved for use only 
when you need to specify the absolute physical brightness.  I can fully 
imagine that later on srgb will become more commonly used and then we'll 
have questions like "what is the rgb keyword for?".


Post a reply to this message

From: Jaap Frank
Subject: Re: Gamma of interpolated colors in color maps
Date: 22 Dec 2010 13:34:07
Message: <4d12449f@news.povray.org>
>"Warp"  schreef in bericht news:4d10761e@news.povray.org... 
>
>The problem with the current pov3.7 is that such a gradient is not
>looking even close to linear, even with monitors where 'rgb 0.5' is
>truly 50% bright, as compared to a test pattern. I don't know why this
>is so, but it just isn't.

I'm curious Warp. I've shrunk the file you made yourself for the thread
'More Gamma Again' in p.b.i to a very small one. Now you don't have
to see through your eyelids but can simple look at it. For me the 3.6 
side is lineair and the 3.7 side absolutely not. How looks this stamp 
on your monitor now?
Don't say it's the thrinking technic, because for me it's absolutely 
the same for the big and the small one.
If you have windows 7, than put the file on your monitor and you
automatically get a stamp as icon.

Can everybody react on this with which side is for them the right
one, because I'm under the impression that more people see 
what I see.

Thanks in advance,

Jaap Frank


Post a reply to this message


Attachments:
Download 'gradient_10_pov.png' (4 KB) Download 'gradient_pov_mini.png' (1 KB)

Preview of image 'gradient_10_pov.png'
gradient_10_pov.png

Preview of image 'gradient_pov_mini.png'
gradient_pov_mini.png


 

From: Jaap Frank
Subject: Re: Gamma of interpolated colors in color maps
Date: 22 Dec 2010 13:39:21
Message: <4d1245d9$1@news.povray.org>
>"Jaap Frank"  schreef in bericht news:4d12449f@news.povray.org... 
>
>If you have windows 7, than put the file on your monitor and you
>automatically get a stamp as icon.

This should have been:

If you have windows 7, than put the file on your DESKTOP and you
automatically get a stamp as icon.
Sorry,

Jaap Frank


Post a reply to this message

From: Warp
Subject: Re: Gamma of interpolated colors in color maps
Date: 22 Dec 2010 16:12:43
Message: <4d1269cb@news.povray.org>
Jaap Frank <jjf### [at] casemanl> wrote:
> I'm curious Warp. I've shrunk the file you made yourself for the thread
> 'More Gamma Again' in p.b.i to a very small one. Now you don't have
> to see through your eyelids but can simple look at it. For me the 3.6 
> side is lineair and the 3.7 side absolutely not. How looks this stamp 
> on your monitor now?

  The purpose of the image was not to show that the gradient is linear,
but that the middle of the gradient corresponds to 50% brightness.

  In the original image there are horizontal lines alternating between
pure black and pure white, hence producing an overall brightness of about
half of pure white. In my monitor this 50% brightness of the sides
corresponds to approximately the middle of the pov3.7 gradient.

  Of course it doesn't *look* 50% bright because the human eye doesn't
perceive the brightness linearly.

  If you scale the image smaller, presumably by averaging pixels, you will
cause the sides to become (128,128,128) (as that's the average between
(0,0,0) and (255,255,255)) which does *not* correspond to 50% brightness.
It corresponds approximately to 50% *perceived* brightness, as seen by
the human eye, at least on monitors with a gamma of 2.2, but it doesn't
correspond to 50% *absolute* brightness, which is what the alternating
lines are producing.

  In my monitor the sides of the scaled-down image look significantly
darker than the sides of the original image.

> Don't say it's the thrinking technic, because for me it's absolutely 
> the same for the big and the small one.

  I really can't understand in which situation the gradient produced
by pov3.6 looks linear and, at the same time, the alternating pattern
looks like corresponding to the middle of that pattern. As far as I
understand, if the pattern would look about the same as the middle
of the gradient, the gradient should not look nowhere even close to
linear, or if the gradient looks linear, the pattern should not look
even close to being the same as the middle of the pattern. Unless the
white lines in the pattern are, for whatever unfathomable reason, narrower
than the black lines (hence reducing the overall brightness of the
pattern).

  I don't think it can be that the system is gamma-correcting what it's
showing on screen (so that the pattern would then match the center of
the gradient) because then the gradient would not look linear (it would
look like what pov3.7 produces by default).

-- 
                                                          - Warp


Post a reply to this message

From: clipka
Subject: Re: Gamma of interpolated colors in color maps
Date: 23 Dec 2010 06:51:45
Message: <4d1337d1@news.povray.org>
Am 22.12.2010 19:34, schrieb Jaap Frank:

> Don't say it's the thrinking technic, because for me it's absolutely the
> same for the big and the small one.

(I guess you mean "shrinking"?)

Theoretically, if your your display is configured properly, the 
/background/ of the thumbnail should look different.

> Can everybody react on this with which side is for them the right
> one, because I'm under the impression that more people see what I see.

Let me re-iterate the facts here:

- It is perfectly normal for the left (double-width) strip to /look/ 
more linear than the right (single-width) one.

- It is also perfectly normal for typical image processing software to 
report the "RGB values" or "greyscale values" of the left strip as 
near-"linear" (something like (0;0;0), (25;25;25), (51;51;51), 
(76,76,76), ... (255;255;255), or 0%, 10%, 20%, ... 100%)

- It is also perfectly normal for typical image processing software to 
average the black-and-white striped background to the same value as the 
middle swatch in the left strip when creating a scaled-down version of 
the image.

- It is however also perfectly normal for the original black-and-white 
striped background to look more like the middle swatch in the /right/ 
strip when squinting your exes.

- The black-and-white stripes of the original-size image background 
/inevitably/ generate a physical light intensity exactly halfway between 
black and white, i.e. /truly/ 50% white.

=> The left stripe typically /looks/ linear, while the right strip 
typically /is/ linear.


Post a reply to this message

From: Warp
Subject: Re: Gamma of interpolated colors in color maps
Date: 23 Dec 2010 09:30:29
Message: <4d135d05@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> => The left stripe typically /looks/ linear, while the right strip 
> typically /is/ linear.

  As I have been discussin in length in this thread, the definition of
"linear" is a bit ambiguous.

  You can say that the right strip "is linear" (at least on a monitor with
the traditional gamma of 2.2) in the sense of radiant flux: The physical
amount of light emitted, when measured in watts. In other words, if you
counted the photons that are emitted by the right strip, this amount would
grow (approximately) linearly as we go down the strip.

  However, while it may be linear in a physical sense as described, it's
not linear in a *practical* sense. It's not linear as perceived by the
human eye, nor is it linear when looking at the pixel values.

  The radiant flux approach ought to give more realistic results when
calculating the illumination of surfaces (ie. how much they reflect light,
this "how much" being, precisely, the amount of radiant flux that the
surface emits). However, it poses a practical problem when the user tries
to create things like gradients that *look* linear, as perceived by the
human eye. This practical problem is only aggravated by the fact that most
people are already accustomed to programs handling brightness in terms of
perceived brightness (rather than radiant flux), as well as the fact that
pixel values map almost linearly to perceived brightness as well (at least
on gamma 2.2 monitors).

  This will cause confusion. However, I'm not sure what the best solution
to this would be. (Things like the 'srgb' keyword and 'poly_wave 2.2' for
maps might help, but there are probably still tons of other situations
where such practical problems might arise.)

-- 
                                                          - Warp


Post a reply to this message

From: Jaap Frank
Subject: Re: Gamma of interpolated colors in color maps
Date: 23 Dec 2010 14:55:21
Message: <4d13a929@news.povray.org>
>clipka <ano### [at] anonymousorg> wrote:
>
>- It is however also perfectly normal for the original black-and-white 
>striped background to look more like the middle swatch in the /right/ 
>strip when squinting your exes.
>
>"Warp"  schreef in bericht news:4d135d05@news.povray.org... 
> As I have been discussing in length in this thread, the definition of
>"linear" is a bit ambiguous.

Let me first say I don't want to start a new discussion between 
two nonconverging opinions, because that's NOT what I wanted.

On the contrary, I want to understand why I can't get my three
monitors do what Warp and clipka are suggesting: 
In principle I should configure  those monitors in such a way that
the right striped side intensity correspond somewhere in the middle 
of the right (3.7) strip. I can tell you that's impossible. There is no 
way I can reach that. 

Ive did send me to

http://www.photoscientia.co.uk/Gamma.htm

to tune my monitors. You get three bloks with colored squares 
inside other colored squares and a gray square for three light 
intensities. 
I've slide my sliders for red, green and blue for hours, but I couldn't 
get it right. The result was awfull, the monitor was totally wrong
in color and brightness.
At last I took a fotograph of my daughters wedding and used this
to get the colors right. This fotograph has a lot of colors that I
have in my head to compare with (green from three days fresh leaves,
sandwashed wood of a bridge over a pond and so on). After I made 
this the way I remember those colors I went back to this site.
Well, now it was exactly as it should be. What I couldn't do first,
I did in a quarter of an hour with this fotograph. 
Further I learned that the monitors are not exactly gamma 2.2, but 
about 1.8-2.0  for the dark intensities, about 2.0 around the middle
intensities and around 2.0-2.2 for the high intensities. Maybe this is 
the difference between gamma 2.2 and srgb correction.
I'm planning to make a tutorial for it and put it in p.b.tutorials. It will
take about fifteen minutes to tune your monitor.

Jaap:
> Don't say it's the thrinking technic, because for me it's absolutely the
> same for the big and the small one.
Clipka:
> (I guess you mean "shrinking"?)

I missed that one :). Guess it's because Christmas is coming.

Jaap


Post a reply to this message

From: Warp
Subject: Re: Gamma of interpolated colors in color maps
Date: 23 Dec 2010 15:10:39
Message: <4d13acbe@news.povray.org>
Jaap Frank <jjf### [at] casemanl> wrote:
> On the contrary, I want to understand why I can't get my three
> monitors do what Warp and clipka are suggesting: 
> In principle I should configure  those monitors in such a way that
> the right striped side intensity correspond somewhere in the middle 
> of the right (3.7) strip. I can tell you that's impossible. There is no 
> way I can reach that. 

  On your monitor, does the pov3.6 gradient on the left look about linear,
while the pov3.7 gradient very non-linear (with most of the shades being
much closer to white than black?

  If you look at the picture from sufficiently far away so that the
patterns on the sides look gray, where would you put them on the pov3.6
gradient?

  If your answer to the first question is that the pov3.6 gradient looks
way more linear than the pov3.7 gradient, and the answer to the second
question is that the pattern looks about the same as the middle of the
pov3.6 gradient, then I'm puzzled, as I don't understand how that is
physically possible.

  An idea comes to mind: Double the size of the image (so that the
horizontal lines on the patterns on the sides become 2 pixels thick),
check that the pattern does indeed alternate between pure white and
pure black, and look at the image from even farther away. Does it still
look the same? Make it 3 times as large as the original (so that the
horizontal lines become 3 pixels thick). Does it still look about the
same brightness?

  I'm wondering if your monitor is blurring or antialiasing the pattern,
causing it to become dimmer. Making the horizontal lines thicker should
remove that possibility.

-- 
                                                          - Warp


Post a reply to this message

From: Jaap Frank
Subject: Re: Gamma of interpolated colors in color maps
Date: 23 Dec 2010 20:17:21
Message: <4d13f4a1@news.povray.org>
>"Warp"  schreef in bericht news:4d13acbe@news.povray.org...
>
>Jaap Frank <jjf### [at] casemanl> wrote:
>> On the contrary, I want to understand why I can't get my three
>> monitors do what Warp and clipka are suggesting:
>> In principle I should configure  those monitors in such a way that
>> the right striped side intensity correspond somewhere in the middle
>> of the right (3.7) strip. I can tell you that's impossible. There is no
>> way I can reach that.
>
>  On your monitor, does the pov3.6 gradient on the left look about linear,
>while the pov3.7 gradient very non-linear (with most of the shades being
>much closer to white than black?

Yes.

> If you look at the picture from sufficiently far away so that the
>patterns on the sides look gray, where would you put them on the pov3.6
>gradient?
>
>  If your answer to the first question is that the pov3.6 gradient looks
>way more linear than the pov3.7 gradient, and the answer to the second
>question is that the pattern looks about the same as the middle of the
>pov3.6 gradient, then I'm puzzled, as I don't understand how that is
<physically possible.
<
<  An idea comes to mind: Double the size of the image (so that the
<horizontal lines on the patterns on the sides become 2 pixels thick),
<check that the pattern does indeed alternate between pure white and
<pure black, and look at the image from even farther away. Does it still
<look the same? Make it 3 times as large as the original (so that the
<horizontal lines become 3 pixels thick). Does it still look about the
<same brightness?
>
>  I'm wondering if your monitor is blurring or antialiasing the pattern,
>causing it to become dimmer. Making the horizontal lines thicker should
>remove that possibility.
>
>-- 
>                                                          - Warp

Answers while sitting on my chair, so distance about 75 cm with
squinting eyes OR standing at a distance of about 4,5 m and wearing
my computer spectacles, so blured again (this workes quit good).
The square numbers are counted from above.
Picture enlarged with Paint Shop Pro 6.

Picture |  Light intensity    |   linearity strips
            | square number    |  impression
            |      3.6        3.7     |   3.6                      3.7
-- 0.75 
m -------------------------------------------------------------------------------
Stamp  |       5           3       | correct                 quit to light
1:1       |       6           4       | just too dark        quit to light
1:2          not possible
-- 4.5 
m ------------------------------------------------------------------------------
1:2       |      7            4/5    | bit too dark         too light
1:3       |      7            5        | bit too dark        bit too light
1:4       |      7            5        | too dark             just too light
1:5       |      7            5        | too dark             just too light

Conclusion: It makes a rather big difference if you are close,
or further away.

Curious about the antialiasing I did put three spectacles on
top of each other and got a very good blow up of my screen
pixels.
With 1:1 the pixels are correct black and white, BUT black
coincide with square number 2, so not totaly black and white
with square number 10, so just not totaly white.
The pixels of the 1:2 until 1:5 pictures were totaly black
and white, so no antialiasing here.

I would say, problem nearly solved. Do the gamma test from a
good distance away from your monitor and blur good.
The linearity of 3.6 looks better then that of 3.7, but 3.6 is just
too dark and 3.7 is too light. Mind that this is for my monitors
which are LCD / TFT monitors.

Jaap


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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