POV-Ray : Newsgroups : povray.advanced-users : Colors outside sRGB gamut : Re: Colors outside sRGB gamut Server Time
24 Apr 2024 00:01:34 EDT (-0400)
  Re: Colors outside sRGB gamut  
From: clipka
Date: 23 Aug 2018 20:32:10
Message: <5b7f520a$1@news.povray.org>
Am 24.08.2018 um 01:24 schrieb Mike Horvath:
> I'm converting a lot of colors from the Munsell Color System to sRGB.
> However, the Munsell gamut seems to be bigger, meaning some of the sRGB
> values are greater than 1.

That is indeed the case.

> What does POV-Ray do when it encounters colors greater than <1,1,1>?

Nothing special; it just takes them and runs with them. POV-Ray may need
to deal with colour components greater than 1.0 anyway, to represent
bright light and brightly-lit surfaces.

Pretty much the only place where clipping occurs is saving the rendered
image to an actual file, and only if the file format is a classic
non-HDR format.


However, colours with components greater than 1.0 are only "semi outside
gamut", as they're just overly bright variants of in-gamut colours. Far
more problematic are colours that would have /negative/ components in sRGB.

POV-Ray's behaviour when encountering negative colour components is
poorly documented, and there may be features where things get weird.


> Since I am more interested in the relative changes between colors than I
> am in the absolute color values, would it be okay for me to normalize
> all the colors so that the max values are equal to 1?

Normalizing the colours to max values of 1 is boringly trivial, because
in the simplest case it just corresponds to dimming the image (= scaling
all channels uniformly) and/or changing the whitepoint (= scaling
individual colour channels).

As for normalizing the colours so that all values fall in the range
0..1, that's also reasonably simple, because at present, colour
management in POV-Ray is only very rudimentary anyway: If you use any
sRGB-related feature (such as the `srgb` keyword for colour literals, or
the `File_Gamma=sRGB` setting), it is presumed that the colour model is
sRGB, but otherwise you are still free to decide what primaries you want
to assign to R, G and B, including imaginary colours (i.e. colours more
saturated than reality allows), which is what you'll need to get all
components into the 0..1 range.

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.


Post a reply to this message

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