POV-Ray : Newsgroups : povray.general : Light Attenuation : Re: Light Attenuation Server Time21 Apr 2024 04:58:15 EDT (-0400)
 Re: Light Attenuation
 From: Trevor G Quayle Date: 11 Mar 2011 16:55:01 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.4d7a9993315d1bec81c811d20%40news.povray.org",
"headline": "Re: Light Attenuation",
"dateCreated": "2011-03-11T21:55:01+00:00",
"datePublished": "2011-03-11T21:55:01+00:00",
"author": {
"@type": "Person",
"name": "Trevor G Quayle"
}
}
Alain <aze### [at] qwertyorg> wrote:

> > For POV, light attenuation uses the function a=2/(1+(d/FD)^FP) [3.4.7.9] for
> > light sources.  However for materials, the light attenuation function is
> > similar: a=1/(1+(d/FD)^FP), but it also allows you to implement a realistic
> > exponential function: a=exp(-d/FD) by setting FP=>1000.  My general question, is
> > why has this more realistic function (generally following Lambert Law of
> > Absorption) not been implemented for light sources as well?  By playing with the
> > FD&  FP values, a close approximation can be found for some range (the best
> > seems to be by using FP=exp(1)=2.72) however it is limited to a specific range
> > and not the whole distance (e.g an absolute deviation of ~+/-0.006 exists only
> > from a relative distance of about 1.74 on, for a pecentage deviation it is even
> > more limited, for a +/-10% deviation from ~1.51 to ~3.67)
> >
> > -tgq
> >
> >
>
> For materials, the atenuation is the result of the interaction of the
> light with the material. Atenuation is caused by absorbtion.
>
> For the light's atenuation over a distance, you need to use the inverse
> square rule to get realistic atenuation, and absolutely need to use
> fade_power 2. It's the spreading of the light's energy that causes the
> atenuation.
> There is NO absorbtion in this case. As there is no absorbtion, any
> formula based on absorbtion would be totaly unrealistic.
>
> The terms are the same, but the physical reality modeled is not.
>
>
>
> Alain

I understand the use of the inverse square for light fading.  I suppose I was
thinking of using the exp function for absorption, however genrally in air this
effect would be minimal.

However, I am not fully convinced the light fading model being used is correct.
For inverse square, I would think the genral function would be:

a= FD/(x^2)

There is a difference between this function and the one used: at x=1, the
functions are equal, however as x increases, the function used overcalculates
the value (eg, x=1.3 +25%, x=2.0 +60%, x=inf +100%).  Below x=1, the function
undercalculates the value (eg, x=0.7 -34%, x=0.5 -60%).

However the inverse square function does have its problems.  As it is an invers
function, it increases greatly as x decreases toward 0, to infinity at x=0.
This does make sense to some degree as we are basically calculating the flux
(lumens/area) and at x=0, the area is 0 (L/0 = inf).

I have posted a graphic in p.b.i to illustrate the differences.  Perhaps
generally the differences in a scene may seem subtle, but there may be
circumstances (eg, my Matinee scene) where it can make a difference.  The light
fading of the projector 'looks' ok, as we don't have any reference, but in
reality, the decay should occur quicker.  One way to get closer I suppose, is to
use a higher fade power in the formula (oddly, using exp(1) for the power gives
a reasonable balance between x=1 and x=4 with a variance from +12% to -28%),
however it is still not technically correct (perhaps that just bothers me as a
perfectionist...)

-tgq
```