POV-Ray : Newsgroups : povray.beta-test : Gamma in POV-Ray 3.6 vs. 3.7 : Re: Gamma in POV-Ray 3.6 vs. 3.7 Server Time
5 Oct 2024 02:11:34 EDT (-0400)
  Re: Gamma in POV-Ray 3.6 vs. 3.7  
From: Le Forgeron
Date: 14 Sep 2009 14:29:15
Message: <4aae8b7b$1@news.povray.org>
Le 14/09/2009 19:53, Mike Raiford nous fit lire :
> clipka wrote:
> 
>> Yeah, that would be something nice to have.
>>
>> Including fluorescence, please :-)
> 
> That would be neat to have... But, how to implement? How would you
> convert from an rgb-specified color to a spectrally specified color?
> 
> fluorescence would be quite fun to have. Impractical, but fun to play with.
> 

You would need to separate real spectrum (color of light) from
transformation matrix (square matrix) (color of pigments).
If using more than one color space (light using spectrum, some pigments
using rgb... ) you need an internal adaptation to convert the matrix
into the dimension/base of the light-ray. You need one anyway at the
camera to return to rgb. (linear or gamma corrected...) (well, not rgb
per se, but whatever the image format would be using... usually rgb so far)

Currently, we have pigment on diagonal matrix (Or r'= (I(p)).r )
(r=ray, p=pigment, I=Identity matrix). Not a big difference, just r'=p.r
with p [n,n], r[1,n] instead.

The basic trick is to propagate on the color/base of the light source.
Merging lights is another part of the fun, you either propagate the
light color as a collection of lights color until the camera (applying
the weights along the ray progression), optionnaly optimising each
color-spectrum system (only 1 spectral component, only 1 rgb, only one
cmyb... ) to reduce the stack size. Or you convert all to an internal
comprehensive base without loss (if such beast can exist ?)

The camera/file writing endpoints just convert that collections of
partial ray-color into the expected component system.

Wondering, is ambient light (global setting) in rgb or just gray ?

> At least with spectral colors and lights you could simulate metameric
> failure.
> 
See you had already the answer: spectral light is a 1-D vector, spectral
color is a 2-D vector,aka matrix (usually only the main diagonal is
used, but frequency converter, bichromism... ). You knew it needed two
different concepts/objects.

In fact the reflection's colour is a matrix, and the refraction's colour
is another. (Today, refraction = coef*reflection ... known as filter)
Transmit should remains a single number, right ?


Post a reply to this message

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