I'm just wondering: is there a plan to extend SDL to allow more than jst rgb
The color specification syntax is already perfectly designed to allow addition
of different colorspaces. So, instead of using macros from colors.inc, syntax
could be made more user-friendly, like
color hsl <0.5,0.3,1>
This is straight-forward, srgb/rgb difference already requires some conversion
anyway. This could be expanded to other color spaces: Yuv, CIE, Lab and so on.
On a similar note, if povray4 goes natively spectral, how will this be handled?
In my mind, I see a block in global_settings that specifies the color mode:
choose rgb or spectral, possibly with a number specifying how many samples to
use, and of course, a mapping function to get back from spectrum to rgb
(nontrivial, there are several different spectral response function models that
try to approximate the human eye, or a display device). In the spectral mode, I
think that colors specified as rgb could be modeled using a default response
function for r,g,b (let's say, the response functions of the eye), but one could
also specify colors as functions of the wavelength: point-wise specified spectra
(which could be specified in a big .inc file). Something like
[0 color rgb <1,0.5,0>] // actually 1*CIE_red+0.5*CIE_green
[1 color spectral <440:0.1,550:0.4,600:0.6,700:1>] //linear interpolation
between specified wavelengths
Is it reasonable to expect something like that?
Post a reply to this message