POV-Ray : Newsgroups : povray.advanced-users : Colors outside sRGB gamut : Re: Colors outside sRGB gamut Server Time
20 Apr 2024 05:53:32 EDT (-0400)
  Re: Colors outside sRGB gamut  
From: clipka
Date: 24 Aug 2018 06:45:13
Message: <5b7fe1b9$1@news.povray.org>
Am 24.08.2018 um 04:08 schrieb Mike Horvath:

>> It must be noted however that /any/ colour computations in a
>> three-channel colour model is inevitably unrealistic; this is true even
>> for sRGB. I'm not sure whether e.g. XYZ colour space would fare better
>> or worse in this respect. My hunch is that the best compromise might be
>> a colour model where the primaries are imaginary but the gamut does not
>> fully encompass the entire "spectral horseshoe".
>>
>> To /really/ get proper colour computations, you'd need to use spectral
>> rendering, i.e. a colour model where you have, say, 16 or maybe even 32
>> colour channels, each assigned to a specific frequency band of the
>> visible spectrum. And of course instead of an sRGB colour you'd have to
>> specify the actual spectrum of your pigments.
>>
> 
> Hopefully this will be practical when someone events a single diode that
> can change to any color. (I.e. so we don't need three diodes for every
> pixel.)

That's irrelevant, as spectral rendering is not about /displaying/
colours, but about /computing/ colours. The end result can still be
converted to sRGB or whatever colour space you prefer.

As an extreme example of what I'm talking about, take sodium light
shining on a red surface: In POV-Ray, the light colour would be modeled
as something around <1,1,0>, and the surface as something around
<1,0,0>. Light bouncing off a surface corresponds to a multiplication
operation, so POV-Ray computes <1,1,0>*<1,0,0> = <1,0,0>, concluding
that sodium light bouncing off a red surface must give a red apparent
colour. But real life instead gives you the ugliest greenish-brown you
can possibly imagine.

This is because unlike most light sources we're familiar with, sodium is
a monochromatic light source that's not really a continuum from red to
green, but rather a single wavelength (well, two actually, but they're
very close together), so whatever material this light is reflected from,
it cannot change in hue, only in brightness.

Using a colour model with 5 spectral bands instead - say Red, Orange,
Yellow, Green, Cyan, Blue - we could model the light as {0,0,5,0,0} and
the surface as, say, {1,.5,.1,0,0}, giving us {0,0,5,0,0}*{1,.5,.1,0,0}
= {0,0,.5,0,0}, concluding that the resulting colour is still
technically yellow, albeit a dim one that we perceive as ugly
greenish-brown.

Note that this will still give wrong results if the light is
monochromatic and, say, halfway between green and cyan. But the result
is still better than with an RGB model, and by increasing the number of
channels we can improve our results even further.


Also note that monochromatic light is just the most extreme and obvious
example; similar effects also happen with continuous spectra. Most
notably, colours will virtually always erroneously drift towards the
dominant primary (i.e. Red, Green or Blue in case of RGB-based models),
especially in volumetric effects (e.g. absorbing media or SSLT), but
also in multi-bounce scenarios (e.g. deep nooks and crannies in a
high-recursion radiosity scene), and even in single-bounce scenarios
(albeit not as pronounced).


Post a reply to this message

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