POV-Ray : Newsgroups : povray.general : Fog, media, filter, transmit questions Server Time
7 Aug 2024 09:22:00 EDT (-0400)
  Fog, media, filter, transmit questions (Message 1 to 3 of 3)  
From: Philippe Debar
Subject: Fog, media, filter, transmit questions
Date: 25 Oct 2001 05:17:21
Message: <3BD7E672.6000907@yahoo.fr>
I am trying to go a little further then 'dumb user' and understand the 
exact (mathematical) way colors interact with fog and media. Which led 
me to questions about filter and transmit.

* fog works like transmit : it adds its color, which is a function of 
the distance between the camera and the object seen through the fog, to 
a fraction of this object color. The color vectors are added, something 
like this : fog_local_color(fog_settings, 
distance)+fog_local_transmit(fog_settings, distance)*object_local_color

* absorption media works in a way similar to filter : it "absorbs 
frequencies". I believe the mechanics are rather different : the filter 
works by multiplying color vectors (is this correct ?) while media color 
is substracted (?).

* emission media works the other way : the local media color is added to 
the seen-trough-media object (?)

* scattering media is another beast altogether ;-)


Is there a place I can find the formulas used for filter, transmit, fog 
and medias (other than source-code) ? (I mean the code for color 
interaction between seen-trough and seen, not the code used to determine 
local density or anything like that... just the way the colors affect 
one another to produce final color.)

I do not know a way to produce a media that reproduce the behaviour of 
fog... is this possible ? (to benefit from localisation in an interior 
and density capabilities of media)


TIA


Povingly,

Philippe


Post a reply to this message

From: Mahalis
Subject: Re: Fog, media, filter, transmit questions
Date: 25 Oct 2001 07:08:46
Message: <3bd7f2be$1@news.povray.org>
Beast is the right term for scattering media... :-)

--

//Mahalis
camera{location<0,0.25,-2> look_at 0.5*y} #declare T=texture{pigment{crackle
scale 0.5 rotate 90 turbulence 0.75 color_map{[0 rgb 1][0.05 rgb 1][0.1
rgb<1,0.25,1>][0.25 rgbf 1][1 rgbf 1]}} finish{ambient 1}} #declare
c=difference{torus{0.5,0.1 rotate -90*x}box{<0.7,0,0.2>,<-0.7,-0.7,-0.2>}}
merge{object{c translate<0.5,0.5,0>} object{c translate<-0.5,0.5,0>}
cylinder{<1,0.5,0>,<1,0,0>,0.1} cylinder{<-1,0.5,0>,<-1,0,0>,0.1}
cylinder{0.5*y,0,0.1} texture{T}}
--


"Philippe Debar" <phd### [at] yahoofr> wrote in message
news:3BD### [at] yahoofr...
> I am trying to go a little further then 'dumb user' and understand the
> exact (mathematical) way colors interact with fog and media. Which led
> me to questions about filter and transmit.
>
> * fog works like transmit : it adds its color, which is a function of
> the distance between the camera and the object seen through the fog, to
> a fraction of this object color. The color vectors are added, something
> like this : fog_local_color(fog_settings,
> distance)+fog_local_transmit(fog_settings, distance)*object_local_color
>
> * absorption media works in a way similar to filter : it "absorbs
> frequencies". I believe the mechanics are rather different : the filter
> works by multiplying color vectors (is this correct ?) while media color
> is substracted (?).
>
> * emission media works the other way : the local media color is added to
> the seen-trough-media object (?)
>
> * scattering media is another beast altogether ;-)
>
>
> Is there a place I can find the formulas used for filter, transmit, fog
> and medias (other than source-code) ? (I mean the code for color
> interaction between seen-trough and seen, not the code used to determine
> local density or anything like that... just the way the colors affect
> one another to produce final color.)
>
> I do not know a way to produce a media that reproduce the behaviour of
> fog... is this possible ? (to benefit from localisation in an interior
> and density capabilities of media)
>
>
> TIA
>
>
> Povingly,
>
> Philippe
>


Post a reply to this message

From: Slime
Subject: Re: Fog, media, filter, transmit questions
Date: 25 Oct 2001 21:34:52
Message: <3bd8bdbc$1@news.povray.org>
I believe fog is a combination of emission and absorption. In other words,
it's scattering media. (Scattering media is identical to a combination of
emission and absorption, except that it also interacts with light. The light
is what causes the emission. So if there's no light in a part of the
scattering media, it will only be absorption there.)

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

"Philippe Debar" <phd### [at] yahoofr> wrote in message
news:3BD### [at] yahoofr...
> I am trying to go a little further then 'dumb user' and understand the
> exact (mathematical) way colors interact with fog and media. Which led
> me to questions about filter and transmit.
>
> * fog works like transmit : it adds its color, which is a function of
> the distance between the camera and the object seen through the fog, to
> a fraction of this object color. The color vectors are added, something
> like this : fog_local_color(fog_settings,
> distance)+fog_local_transmit(fog_settings, distance)*object_local_color
>
> * absorption media works in a way similar to filter : it "absorbs
> frequencies". I believe the mechanics are rather different : the filter
> works by multiplying color vectors (is this correct ?) while media color
> is substracted (?).
>
> * emission media works the other way : the local media color is added to
> the seen-trough-media object (?)
>
> * scattering media is another beast altogether ;-)
>
>
> Is there a place I can find the formulas used for filter, transmit, fog
> and medias (other than source-code) ? (I mean the code for color
> interaction between seen-trough and seen, not the code used to determine
> local density or anything like that... just the way the colors affect
> one another to produce final color.)
>
> I do not know a way to produce a media that reproduce the behaviour of
> fog... is this possible ? (to benefit from localisation in an interior
> and density capabilities of media)
>
>
> TIA
>
>
> Povingly,
>
> Philippe
>


Post a reply to this message

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