POV-Ray : Newsgroups : povray.newusers : Color Filtering, Transmittance Server Time
23 Dec 2024 14:40:44 EST (-0500)
  Color Filtering, Transmittance (Message 1 to 2 of 2)  
From: Silverlight2009
Subject: Color Filtering, Transmittance
Date: 8 Apr 2009 08:15:00
Message: <web.49dc949921e3bd581ac52c380@news.povray.org>
Hello!
Could someone tell me the exact formula, by wich POV-Ray calculates the color
values, when filter and transmit values are specified?
For example I give the color values: R(O), G(O), B(O), F(O), T(O) (let "O" mean
object here), and the colors of the backgrounc is R(B), G(B), B(B). Now, how
can I calculate, wich colours will the object show? Thank you very much for any
help.


Post a reply to this message

From: clipka
Subject: Re: Color Filtering, Transmittance
Date: 8 Apr 2009 08:50:00
Message: <web.49dc9c7a355b74cff3b4f0@news.povray.org>
"Silverlight2009" <nomail@nomail> wrote:
> Hello!
> Could someone tell me the exact formula, by wich POV-Ray calculates the color
> values, when filter and transmit values are specified?
> For example I give the color values: R(O), G(O), B(O), F(O), T(O) (let "O" mean
> object here), and the colors of the backgrounc is R(B), G(B), B(B). Now, how
> can I calculate, wich colours will the object show? Thank you very much for any
> help.

Just had a look at it in the code. I think it's bogus regarding how the filter
is applied to the object, but anyway, here it is (effectively; the algorithm is
a bit more complex):

    R = R(O) * [ 1 - T(O) - F(O) * max(R(O),G(O),B(O)) ]
      + R(B) * [     T(O) + F(O) * R(O) ]

and similarly for the other color channels.


Post a reply to this message

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