POV-Ray : Newsgroups : povray.pov4.discussion.general : Builtin color spaces, spectral colors? : Re: Builtin color spaces, spectral colors? Server Time
18 May 2022 16:20:09 EDT (-0400)
  Re: Builtin color spaces, spectral colors?  
From: Bernard
Date: 16 Apr 2013 08:55:01
Message: <web.516d4989b3de06a9042664b0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

>
> This is one of multiple reasons why I'm trying to figure out a good way
> to convert from RGB to some synthesized spectrum: It'll allow to use
> spectral math inside the render engine, but still use the RGB colour
> model in scenes.

I am not sure why there should be any requirement for spectral ray tracing in
PovRay except perhaps as a secondary specialist choice. Colour and the spectrum
are different identities.  Colour does not exist in the physical world, only as
a physiological phenomenon in our eye/head, and in this respect there are only 3
colours. We can not respond to every wavelength in the light spectrum except by
relegating to one of, or a mixture of, our 3 responses. It would, no doubt, make
refraction more interesting but this is bound to be of minority interest among
those who wish to make 3D scenes in 'real' colour. But probably there is more
involved than I realise.
>
> But you're making an interesting point there: Maybe we should also
> provide for more intuitive color models to be used in scenes.
>
> I think it is obvious that one of the three parameters for such a color
> model would need to govern (1) the hue, while the other two should not
> influence it in any way.

I suspect that what you are looking for here does not exist. Among the many ways
of representing colour numerically, RGB has the advantage (if it is an
advantage) of being the closest parallel to our colour vision mechanism. It is
certainly difficult for the novice to visualise the colour represented by RGB
parameters but only to the extent that I have difficulty in visualising the
effect of many other PovRay function parameters.
>
> For easy use with light sources, it should be possible to adjust the
> brightness in the most simple manner possible, i.e. by tweaking just one
> single parameter. Therefore, for any given hue the second parameter
> should govern (2) the saturation, and for any given combination of hue
> and saturation the third parameter should govern (3) the brightness.
>
> There are two other properties that would both be desirable but can't be
> fulfilled together: It would be nice for the third parameter to directly
> specify luminance (i.e. what the .grey component returns). On the other
> hand this would make it extremely difficult to specify a pigment with
> maximum chroma for any given hue, which I'd personally consider a no-go.
>
> The above constraints rule out both chroma- and lightness-based models,
> even though they would have merits of their own. I guess in the end the
> model will inevitably have to be a variation of HSV (aka HSB).
>
> A major open question would be whether to specify the brightness in
> terms of a perceptual or physical scale.
>
The only way for anyone to be sure is to see the colour in front of you. I have
two tools which I use, a colour picker and one which facilitates  comparison
with colours already entered (e.g. in an .inc colour map). I can make these
available if anyone is interested and after making them more user-friendly.

> Thinking about it, this type of parameterization might also make it
> easier to convert from user-specified colour to a synthetic spectrum.
Please don't!
I now retreat in the face of greater mathematical minds.


Post a reply to this message

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