POV-Ray : Newsgroups : povray.beta-test : Gamma in POV-Ray 3.6 vs. 3.7 Server Time
5 Oct 2024 10:17:11 EDT (-0400)
  Gamma in POV-Ray 3.6 vs. 3.7 (Message 51 to 60 of 75)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Ive
Subject: Re: Gamma in POV-Ray 3.6 vs. 3.7
Date: 14 Sep 2009 12:27:04
Message: <4aae6ed8$1@news.povray.org>
clipka wrote:

> How about just checking for "png_inf->valid & PNG_INFO_sRGB"? Shouldn't 
> that do the same job?
>

You are aware that you are breaking the poor mans idea of encapsulation 
by directly accessing the fields from png_inf ;)

And it's by no means time critical, so why not just use the API call?


> Another thing: The sRGB spec speaks of aiming to achieve an overall 
> viewing gamma of 1.125; am I however correct in assuming that decoding 
> sRGB-encoded material according to the sRGB decoding function will 
> nonetheless reconstruct the /linear/ data?
>

The sRGB viewing gamma of 1.125 is just another (poor mans) attempt of 
taking the environment illumination of some typical pc user into 
account. There are much more complicated attemps from the ICC and I 
really think we do not need to care about this.


-Ive


Post a reply to this message

From: clipka
Subject: Re: Gamma in POV-Ray 3.6 vs. 3.7
Date: 14 Sep 2009 13:23:15
Message: <4aae7c03$1@news.povray.org>
Ive schrieb:

> You are aware that you are breaking the poor mans idea of encapsulation 
> by directly accessing the fields from png_inf ;)
> 
> And it's by no means time critical, so why not just use the API call?

Because POV-Ray currently uses the same construct to check for presence 
of a gAMA chunk?

No other reason.

> The sRGB viewing gamma of 1.125 is just another (poor mans) attempt of 
> taking the environment illumination of some typical pc user into 
> account. There are much more complicated attemps from the ICC and I 
> really think we do not need to care about this.

So, in other words, it is indeed just a recommendation for viewing 
software? Something like, "guys, this encoding scheme makes sure you can 
reconstruct the linear data - we suggest however you don't just 
compensate for actual hardware gamma, but also for viewing environment; 
if in doubt, we suggest trying to achieve those 1.125". Did I get that 
right?


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Gamma in POV-Ray 3.6 vs. 3.7
Date: 14 Sep 2009 13:39:31
Message: <4aae7fd2@news.povray.org>
Le_Forgeron wrote:
> color srgb <1.8,0.5,0.5,0.5>

Ugly. When I see four components, I already have my mind trained to expect
the first three are RGB and the fourth is transparency (which kind of
transparency depends on whether it's rgbf or rgbt).


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Gamma in POV-Ray 3.6 vs. 3.7
Date: 14 Sep 2009 13:46:00
Message: <4aae8158@news.povray.org>
Warp wrote:
>   Of course if the user has not specified an assumed gamma for the input
> image either, then the default should probably be Display_gamma (ie. so
> that the image will look in POV-Ray the same it looks when viewed with
> some image viewing program).

Wouldn't this cause the scene to render differently on different computers,
in a way that cannot be easily corrected afterwards? (if the entire image
has wrong gamma, it can be corrected, but if a single texture image_map has
wrong gamma, you can't easily fix it by postprocessing the output image)


Post a reply to this message

From: Mike Raiford
Subject: Re: Gamma in POV-Ray 3.6 vs. 3.7
Date: 14 Sep 2009 13:57:50
Message: <4aae841e@news.povray.org>
clipka wrote:

> Yeah, that would be something nice to have.
> 
> Including fluorescence, please :-)

That would be neat to have... But, how to implement? How would you 
convert from an rgb-specified color to a spectrally specified color?

fluorescence would be quite fun to have. Impractical, but fun to play with.

At least with spectral colors and lights you could simulate metameric 
failure.

-- 
~Mike


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Gamma in POV-Ray 3.6 vs. 3.7
Date: 14 Sep 2009 14:09:43
Message: <4aae86e6@news.povray.org>
clipka wrote:
> Hey, get real: You need to press the "shift" key for quite a host of
> things, I guess. As a German, for instance, I need to press "shift" to
> get a multiplication asterisk, dividing slash, opening or closing
> parentheses, quotes etc,

And for all nouns too, right? :)


Post a reply to this message

From: clipka
Subject: Re: Gamma in POV-Ray 3.6 vs. 3.7
Date: 14 Sep 2009 14:19:43
Message: <4aae893f$1@news.povray.org>
Mike Raiford schrieb:
> That would be neat to have... But, how to implement? How would you 
> convert from an rgb-specified color to a spectrally specified color?

Oh, I guess that shouldn't be too difficult: Just multiply each color 
component with the spectral output of some standard phosphor for that 
color - et voila. It would boil down to an 3xN matrix multiplication.

Generating the output image should be just as easy: Using an Nx3 matrix 
based on the CIE tristimulus curves would give the color in XYZ color 
space. From there it's just another 3x3 matrix multiplication to csRGB. 
Consequently, there must also exist some Nx3 matrix to take us directly 
to sRGB.)

Of course, to make any /real/ use of this feature, there would neet to 
be an additional color syntax to have more control over a color's spectrum.


> fluorescence would be quite fun to have. Impractical, but fun to play with.
> 
> At least with spectral colors and lights you could simulate metameric 
> failure.

Whatever that may be...


Post a reply to this message

From: Ive
Subject: Re: Gamma in POV-Ray 3.6 vs. 3.7
Date: 14 Sep 2009 14:24:27
Message: <4aae8a5b$1@news.povray.org>
clipka wrote:
> Because POV-Ray currently uses the same construct to check for presence 
> of a gAMA chunk?
> 
> No other reason.
> 

Ah, OK then.


> So, in other words, it is indeed just a recommendation for viewing 
> software? Something like, "guys, this encoding scheme makes sure you can 
> reconstruct the linear data - we suggest however you don't just 
> compensate for actual hardware gamma, but also for viewing environment; 
> if in doubt, we suggest trying to achieve those 1.125". Did I get that 
> right?

Yes sir. But it might be the reason why the beta from the sRGB transfer 
function was chosen the way it is, but this is also something we do not 
need to care about.

Note to myself: reread the sRGB specs.
Answer from myself: has to wait 'till tomorrow.

-Ive


Post a reply to this message

From: Le Forgeron
Subject: Re: Gamma in POV-Ray 3.6 vs. 3.7
Date: 14 Sep 2009 14:29:15
Message: <4aae8b7b$1@news.povray.org>
Le 14/09/2009 19:53, Mike Raiford nous fit lire :
> clipka wrote:
> 
>> Yeah, that would be something nice to have.
>>
>> Including fluorescence, please :-)
> 
> That would be neat to have... But, how to implement? How would you
> convert from an rgb-specified color to a spectrally specified color?
> 
> fluorescence would be quite fun to have. Impractical, but fun to play with.
> 

You would need to separate real spectrum (color of light) from
transformation matrix (square matrix) (color of pigments).
If using more than one color space (light using spectrum, some pigments
using rgb... ) you need an internal adaptation to convert the matrix
into the dimension/base of the light-ray. You need one anyway at the
camera to return to rgb. (linear or gamma corrected...) (well, not rgb
per se, but whatever the image format would be using... usually rgb so far)

Currently, we have pigment on diagonal matrix (Or r'= (I(p)).r )
(r=ray, p=pigment, I=Identity matrix). Not a big difference, just r'=p.r
with p [n,n], r[1,n] instead.

The basic trick is to propagate on the color/base of the light source.
Merging lights is another part of the fun, you either propagate the
light color as a collection of lights color until the camera (applying
the weights along the ray progression), optionnaly optimising each
color-spectrum system (only 1 spectral component, only 1 rgb, only one
cmyb... ) to reduce the stack size. Or you convert all to an internal
comprehensive base without loss (if such beast can exist ?)

The camera/file writing endpoints just convert that collections of
partial ray-color into the expected component system.

Wondering, is ambient light (global setting) in rgb or just gray ?

> At least with spectral colors and lights you could simulate metameric
> failure.
> 
See you had already the answer: spectral light is a 1-D vector, spectral
color is a 2-D vector,aka matrix (usually only the main diagonal is
used, but frequency converter, bichromism... ). You knew it needed two
different concepts/objects.

In fact the reflection's colour is a matrix, and the refraction's colour
is another. (Today, refraction = coef*reflection ... known as filter)
Transmit should remains a single number, right ?


Post a reply to this message

From: clipka
Subject: Re: Gamma in POV-Ray 3.6 vs. 3.7
Date: 14 Sep 2009 14:30:17
Message: <4aae8bb9$1@news.povray.org>
Nicolas Alvarez schrieb:

>> Hey, get real: You need to press the "shift" key for quite a host of
>> things, I guess. As a German, for instance, I need to press "shift" to
>> get a multiplication asterisk, dividing slash, opening or closing
>> parentheses, quotes etc,
> 
> And for all nouns too, right? :)

Which makes me think - isn't it remarkable that the most common word in 
the English language that is capitalized happens to be a particularly 
egoistic one?

In the German language, on the other hand, it happens to be the 
respectful variant of the 2nd person pronouns that stand out capitalized 
over all their kin ;-)


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.