POV-Ray : Newsgroups : povray.general : Rendering colors outside of RGB space : Re: Rendering colors outside of RGB space Server Time
30 Jul 2024 16:25:04 EDT (-0400)
  Re: Rendering colors outside of RGB space  
From: scott
Date: 9 Apr 2009 11:16:48
Message: <49de1160@news.povray.org>
>> Wrong. Out of gamut values are indicated by one or more RGB components
>> with *negative* values. It has nothing to do with HDR. And IIRC POV-Ray
>> does clip negative values - but it is a long time since I looked at the
>> source - so you might know better.
>
> Well, if RGB components can be negative, then obviously we're not talking 
> about
> a straightforward 3-band spectrum (or am I missing something here?) as
> simulated by POV-Ray.

RGB are just 3 numbers that tell you how much of three actual colours to mix 
together.  The actual 3 colours that are mixed will depend on your monitor, 
or what colour space you are working in (if you are not displaying the 
results directly).

It makes no difference what the maximum limit of each channel is, whether 
it's 1, 255 or 34723489, you are still only going to end up with colours 
inside that colour space (ok they be representing a really bright colour, 
but the colour will still be inside the colour space).

The only way to generate colours outside of the colour space is to use 
negative values.  If, for example, you want to model a laser light in POV, 
you are not going to be able to describe the colour using only positive 
values of RGB, you would have to use a negative somewhere because 
monochromatic light sources are outside of most colour spaces.

If POV doesn't clip negative values, then the final rendered result should 
be physically accurate, even if un-displayable on most hardware.  Some 
colour shift algorithm would usually be needed to map the entire visual 
colour space onto displayable RGB, just clamping negative values to 0 is a 
very very poor one as the hue is not preserved.  A better one is to reduce 
the saturation of the colour while keeping the hue until it is on the border 
of the RGB colour space.


Post a reply to this message

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