POV-Ray : Newsgroups : povray.advanced-users : Color conversion : Re: Color conversion Server Time
5 May 2024 13:01:38 EDT (-0400)
  Re: Color conversion  
From: scott
Date: 16 Nov 2009 05:47:04
Message: <4b012da8$1@news.povray.org>
> So in /that/ context, there is no "whitepoint" involved, right? Or am I 
> getting something wrong here?

You're right, "whitepoint" has no relevance or meaning when you're talking 
solely about a tristimulus value or a specific spectrum.

> And when you add two spectral colors, still the whitepoint would not come 
> into play

Nope.

> And with the sRGB color model, the same principle applies, because it is 
> just another choice of the coordinate axes in 3D color space (leaving the 
> transport function aside for now).

You have to deal with linear sRGB to be able to "add" the values together, 
but yes it's just the same because XYZ -> (linear)sRGB is just a linear 
relationship.

> So as long as we're talking about some light color which we intend to 
> convert from XYZ to sRGB, we can happily forget about whitepoint: If we 
> shove a XYZ color into the transformation matrix that represents "white" 
> in the physical sense, then the sRGB color we get will just as well 
> represent "white" in the physical sense - right?

Yes, XYZ <-> sRGB is a 1-1 fixed mapping that has no dependence on any white 
point.

> Thus, in order to "render" light of a certain color with know XYZ 
> coordinates on an sRGB "output channel" (be it a device, a file, or 
> whatever), we should just take the XYZ value we have, shove it through the 
> transformation matrix as defined in the sRGB standard, and live happily 
> ever after. As for viewing conditions, I would expect these to be taken 
> care of automatically by a properly calibrated display.

Yes exactly.  This is what I assumed the OP wanted at the beginning of this 
thread.  But it turns out the "XYZ" they "knew" was actually measured from a 
reflective surface under a certain light source.  They wanted to display 
"the surface" on their monitor as if it was lit from a different light 
source.  In order to achieve this you need to calculate a new XYZ value 
first to account for the different illuminant, then convert to sRGB.  I 
think it's confusing to call the illuminant a "reference white", but hey.

> I just toyed around with the sRGB transformation matrix, leading me to the 
> conclusion that the XYZ color model must be using illuminant *E* (!) (that 
> is, equal physical light intensity) as its native "white" (i.e. <1,1,1> - 
> heck, I could have guessed that from the x,y coordinates of the various 
> illuminants), while "the" sRGB "white" (again <1,1,1>) matches D65. 
> (Ah-hah! So that's what the "display whitepoint" is denoting in the sRGB 
> specs.)

:-)  I was going to say earlier you could start with sRGB=<1,1,1> and work 
back to XYZ to find out what "white" meant in sRGB space.

> Okay, so I think I got it, as far as light goes. Now for the color of 
> surfaces:
>
> In my naive mind, I would have presumed that to specify the color of a 
> surface via the CIE XYZ color system, one would specify the XYZ 
> coordinates of the diffusely reflected light when the surface in question 
> is subject to physically white light (i.e. illuminant E); however, from 
> your explanations I gather that this is /not/ the case, right?

That is one option, but generally illuminant E is not available or not 
desired (for whatever reason), so D50, D65 or some other can be used.  So 
long as you specify the XYZ value *and* the illuminant used then it's enough 
to define the absolute reflective colour of the surface and how it will 
appear under any other illuminant.

> Which raises the (possibly trivial) question, what exactly /is/ then 
> specified for color pigments? Is it, as I now tend to presume, the XYZ 
> coordinates of the diffusely reflected light when subject to illuminant 
> D65 instead?

We only use D65 in the display industry because the reflective colour of 
LCDs only becomes visible under very bright conditions (eg outside when it's 
sunny) - then D65 is a good approximation of the illuminant and thus allows 
direct comparison of the transmissive and reflective xyY values (obviously 
you want them to match as closely as possible so things don't change colour 
when the sun comes out!).

If your reflective surfaces will mostly be viewed under some other lighting 
conditions then it probably makes sense to use that illuminant as your 
reference.


Post a reply to this message

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