POV-Ray : Newsgroups : povray.advanced-users : Colors outside sRGB gamut : Re: Colors outside sRGB gamut Server Time
25 Apr 2024 10:57:19 EDT (-0400)
  Re: Colors outside sRGB gamut  
From: Kenneth
Date: 26 Aug 2018 16:35:00
Message: <web.5b830df6a983101da47873e10@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

>
> 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.

I assume that it also happens in the render preview (which is presented on a
typical low-dynamic-range monitor). For example, rgb <0.3,0.5,0.7>  vs.
1.7*<0.3,0.5,0.7> for an object's color.  The latter would equate to
<0.51,0.85,1.19>, with the blue being clipped to 1.0-- a shift in not only
brightness but color. (And also depending on the scene's lighting intensity and
color.)

A curious question: Is such clipping of the preview done *by* POV-Ray prior to
the scene being rendered? Or is it done strictly after-the-fact by the (LDR)
monitor and its video card?

>
> 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.
>

Here's my own experience with negative color components (and I just re-tested
it):

[For a typical LDR render, and with no radiosity]:

For OBJECT colors:
(with NO lights in scene, and finish{ambient or emission at 1.0}):
Negative color components just 'floor out' at 0.0, no matter how negative they
go:
rgb <0,.3,.6>,  <-1,.3,.6,>,  <-100,.3,.6>  etc. produce the same visual result.

For LIGHTING colors:
The resulting brightness/color of an OBJECT depends on the object's finish-- the
ambient/emission values, and more importantly, the diffuse value. (The diffuse
paremeter in finish decides to what degree a scene's *light* actually affects
the object.) For example:

Example 1:
light:  rgb -1.0 (negative)
object's finish: ambient 0.3 emission 0 diffuse 0.2

The diffuse value here (i.e., the object's reaction to *lighting*) is only
20-percent of full 'effect'. So the 'negative' brightness of the light is
*erasing* only a small part of the the overall ambient value, which consequently
has 'more' of a visual effect on the surface brightness than the light-- the
object's surface intensity there is perhaps (1.0 - 0.2)*0.3 (?) (and also
depends on the angle of incidence of the light.) So the object's surface is
still visible, just darker. However...

Example 2:
light:  rgb -1 (negative)
object's finish: ambient 0.3 emission 0 diffuse 1.0

Here, the light's effect on the surface is 100-percent-- and since the light's
color/brightness is 'negative', it now overpowers the ambient value 100-percent.
The result is that the object surface is now black-- EXCEPT in the shadows; they
are 'blocked' from the (negative) light source, and continue to show just the
ambient 0.3 value (which BTW is an interesting way to see *just* the shadowed
areas in a render.)

[Actually, my simple equation in the first example may not be truly correct:  I
see that an object finish of   {ambient 0.3 emission 0 diffuse 0.75}   is enough
to make the surfaces appear black, at least on my own monitor. That would be
(1.0 - 0.75)*0.3, which isn't truly 0.0 but 0.075   Maybe my monitor is out of
whack? Or perhaps there are subtle gamma issues that I haven't taken into
account.]

With more complex 'negative' colors for object and light--
like rgb <-0.7,-0.3,0.7> and rgb <0.6,-1.0,0.8>, respectively--
the effect naturally get more complicated, and 'shifts' the resulting
object-surface colors (except in the true shadows!)


Post a reply to this message

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