POV-Ray : Newsgroups : povray.general : Meaning of rgbft? Server Time
17 Nov 2024 15:13:05 EST (-0500)
  Meaning of rgbft? (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Micha Riser
Subject: Meaning of rgbft?
Date: 14 Feb 2003 09:30:10
Message: <3e4cfd71@news.povray.org>
I can imagine what it means if there is only filter and only transparency 
defined at some point of the surface -- but what is the meaning if both 
are?

That is given 
P: a point on a surface 
f: filter value at P 
t: transparency at P 
l: colour that would be the result from enlighting the point if t were zero 
o: colour that is "coming from the other side of the surface", e.g. would be 
the result if t=1 and f=0

what is the formula function(f,t,l,o) for calculating the resulting colour 
in P? Anybody?

- Micha

-- 
POV-Ray Objects Collection: http://objects.povworld.org


Post a reply to this message

From: Micha Riser
Subject: Re: Meaning of rgbft?
Date: 14 Feb 2003 11:44:23
Message: <3e4d1ce7@news.povray.org>
Micha Riser wrote:

> 
> That is given
> P: a point on a surface
> f: filter value at P
> t: transparency at P
> l: colour that would be the result from enlighting the point if t were
> zero 
> o: colour that is "coming from the other side of the surface", e.g.
> would be the result if t=1 and f=0

I forgot one variable
p: rgb colour of pigment at point P

for f=0 I would suggest (quite sure about this):
 resultingcolour = (1-t)*l + t*o

and for t=1 my guess is something like
 resultingcolour = f*(p*o) + (1-f)*o  

where '*' is the componentwise multiplication

-- 
POV-Ray Objects Collection: http://objects.povworld.org


Post a reply to this message

From: Warp
Subject: Re: Meaning of rgbft?
Date: 14 Feb 2003 12:15:29
Message: <3e4d2430@news.povray.org>
Micha Riser <mri### [at] gmxnet> wrote:
> but what is the meaning if both are?

  This is what I have wondered as well.
  They are both very useful separately since they give different
transparency used for different purposes. However, using them both
at the same time gives results which usually don't produce anything
nice. Well, perhaps with low values for one of them or both could
give some useful effect.
  Probably it was easier to allow them to be used at the same time than
explicitly disallowing it. Or something. I don't know. :)

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: Tom Melly
Subject: Re: Meaning of rgbft?
Date: 14 Feb 2003 12:29:11
Message: <3e4d2767$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message news:3e4d2430@news.povray.org...

>   This is what I have wondered as well.

<snip>

seems to be a common trend at the moment - I fell asleep last night pondering on
this (ykybrtlw). I wasn't helped by what seemed a rather ambiguous statement in
the docs concerning filter (6.1.5):

"The color of the object is subtracted from the light passing through so this is
called subtractive transparency."

Does this sound right? It sounds as though rgbf<1,0,0,1> would subtract the red,
but allow the green and blue through, which, afaik, is not the case (or have I
just gone mad?).


Post a reply to this message

From: Micha Riser
Subject: Re: Meaning of rgbft?
Date: 14 Feb 2003 12:37:56
Message: <3e4d2974@news.povray.org>
Warp wrote:

> Micha Riser <mri### [at] gmxnet> wrote:
>> but what is the meaning if both are?
> 
>   This is what I have wondered as well.

one way I could think of filter is that it is like a thinn, strong layer of 
scattering media behind the surface.. but I have no idea if the POV 
developper had this in mind or this is consitient with POV (probably not)

following the media approach I came to following:

The scattering part would be (approx.): f*(o*p)*dl
(where dl is something like the length of the media.)

The part of light shining through the media layer: 
 exp(-f*p*dl) * o 
which can be approximated using exp(x) = 1+x to:
 (1-f*p*dl)*o

setting dl to 1 and summing up gives:
 f*(o*p) + (1-f*p)*o

Now this shines only through as much as the transparency of the surface is, 
so the whole is multiplied by t. Including the "normal" lighting this 
gives:
 (1-t)*l + t*o*( f*p + (1-f*p) )

Any comments?

- Micha


-- 
POV-Ray Objects Collection: http://objects.povworld.org


Post a reply to this message

From: Micha Riser
Subject: Re: Meaning of rgbft?
Date: 14 Feb 2003 12:41:51
Message: <3e4d2a5f@news.povray.org>
Micha Riser wrote:

>  (1-t)*l + t*o*( f*p + (1-f*p) )
                   ^^^^^^^^^^^^^
Oops, this simplifies to 1 
:o

-- 
POV-Ray Objects Collection: http://objects.povworld.org


Post a reply to this message

From: Micha Riser
Subject: Re: Meaning of rgbft?
Date: 14 Feb 2003 12:49:39
Message: <3e4d2c33@news.povray.org>
Micha Riser wrote:

> one way I could think of filter is that it is like a thinn, strong layer
> of scattering media behind the surface.. but I have no idea if the POV
> developper had this in mind or this is consitient with POV (probably not)

I revise my model. NOT scattering but absorbing media only. So cancle out 
the scattering amouth gives:

> The part of light shining through the media layer:
>  exp(-f*p*dl) * o
> which can be approximated using exp(x) = 1+x to:
>  (1-f*p*dl)*o
> 
setting dl to 1:
  f*(o*p) + (1-f*p)*o

> 
> Now this shines only through as much as the transparency of the surface
> is, so the whole is multiplied by t. Including the "normal" lighting this
> gives:
  (1-t)*l + t*o*(1-f*p)

Hope this makes more sense now.

> 
> Any comments?

- Micha

-- 
POV-Ray Objects Collection: http://objects.povworld.org


Post a reply to this message

From: Slime
Subject: Re: Meaning of rgbft?
Date: 14 Feb 2003 13:28:59
Message: <3e4d356b$1@news.povray.org>
I believe that it's this:

color seen =
l*(1-t)*(1-f) // color of the surface minus transmittence and filter amounts
 + o*t // transmitted light
 + f*o*l // filtered light

This is only based off of observation and thought, not from the source code
or anything. If it's correct, then f + t should never be > 1 if you want to
be physically realistic.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Jellby
Subject: Re: Meaning of rgbft?
Date: 14 Feb 2003 14:01:15
Message: <3e4d3cfb@news.povray.org>
Among other things, Slime wrote:

> color seen =
> l*(1-t)*(1-f) // color of the surface minus transmittence and filter
> amounts
>  + o*t // transmitted light
>  + f*o*l // filtered light

Is the filtering factor affected by external lighting? I mean, is the 
filtered ligt f*l*o or f*p*o? (where p is the rgb colour of the surface and 
l is the colour altered by any lighting/shadowing there might be).

-- 

Linux User #289967 (counter.li.org)
PGP Pub Key ID: 0x01A95F99 (pgp.escomplinux.org)


Post a reply to this message

From: Slime
Subject: Re: Meaning of rgbft?
Date: 14 Feb 2003 14:27:03
Message: <3e4d4307$1@news.povray.org>
> Is the filtering factor affected by external lighting? I mean, is the
> filtered ligt f*l*o or f*p*o? (where p is the rgb colour of the surface
and
> l is the colour altered by any lighting/shadowing there might be).


Oh, it's probably f*p*o. Yeah, because a sphere with rgbf <1,0,0,1> against
a white background has no shading.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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