POV-Ray : Newsgroups : povray.general : Light Source Issue Server Time
24 Dec 2024 08:10:06 EST (-0500)
  Light Source Issue (Message 1 to 10 of 10)  
From: Motive17
Subject: Light Source Issue
Date: 10 Jan 2018 05:50:00
Message: <web.5a55efc397aeb4fe278d3b70@news.povray.org>
Good morning to all,

I'm focusing on a quite strange issue.

I have simply defined this light source:

    light_source {
                 <0,500,-1000>
                 color rgb <255, 255, 255>
                 fade_distance 1
                 fade_power 0
                 media_interaction off
                 media_attenuation off
                     }

and this object:

cylinder {
              <0, 0, 1000>,
              <0, 1000, 1000>,
              (100)
              pigment {rgb <0, 0, 0>}
              finish {
                     ambient 0
                     diffuse 1
                     specular 1
                     emission 0
                     roughness 0.005
                     reflection {
                                0.5
                                metallic
                                }

then, gradually I'm moving the light source until z=-100000, leaving the camera
fixed:

camera {
          perspective
        location <0,500,0>
        look_at <0,500,1000>
        rotate <0, 0, 0>
        up <0,2,0>
        right <2,0,0>
        }

The strange issue is relative to the behaviour of the light reflected by the
cylinder. It seems to increase when I increase the distance between object and
light source. Why? There is any light attenuation defined.

Anyone have an idea about that?

Thank you

Best regards


Post a reply to this message

From: Kontemplator
Subject: Re: Light Source Issue
Date: 10 Jan 2018 08:15:01
Message: <web.5a561141ee00f7ec659f6d40@news.povray.org>
"Motive17" <nomail@nomail> wrote:
> Good morning to all,
>
> I'm focusing on a quite strange issue.
>
> I have simply defined this light source:
>
>     light_source {
>                  <0,500,-1000>
>                  color rgb <255, 255, 255>
>                  fade_distance 1
>                  fade_power 0
>                  media_interaction off
>                  media_attenuation off
>                      }
>
> and this object:
>
> cylinder {
>               <0, 0, 1000>,
>               <0, 1000, 1000>,
>               (100)
>               pigment {rgb <0, 0, 0>}
>               finish {
>                      ambient 0
>                      diffuse 1
>                      specular 1
>                      emission 0
>                      roughness 0.005
>                      reflection {
>                                 0.5
>                                 metallic
>                                 }
>
> then, gradually I'm moving the light source until z=-100000, leaving the camera
> fixed:
>
> camera {
>           perspective
>         location <0,500,0>
>         look_at <0,500,1000>
>         rotate <0, 0, 0>
>         up <0,2,0>
>         right <2,0,0>
>         }
>
> The strange issue is relative to the behaviour of the light reflected by the
> cylinder. It seems to increase when I increase the distance between object and
> light source. Why? There is any light attenuation defined.
>
> Anyone have an idea about that?
>
> Thank you
>
> Best regard

Try a parallel light and the effect vanish. If I use a spotlight, the visible
radius increase with the distance to the object. Same for the point
light_source.


Post a reply to this message

From: Motive17
Subject: Re: Light Source Issue
Date: 10 Jan 2018 08:45:01
Message: <web.5a561862ee00f7ece278d3b70@news.povray.org>
"Kontemplator" <haf### [at] yahoocom> wrote:
> "Motive17" <nomail@nomail> wrote:
> > Good morning to all,
> >
> > I'm focusing on a quite strange issue.
> >
> > I have simply defined this light source:
> >
> >     light_source {
> >                  <0,500,-1000>
> >                  color rgb <255, 255, 255>
> >                  fade_distance 1
> >                  fade_power 0
> >                  media_interaction off
> >                  media_attenuation off
> >                      }
> >
> > and this object:
> >
> > cylinder {
> >               <0, 0, 1000>,
> >               <0, 1000, 1000>,
> >               (100)
> >               pigment {rgb <0, 0, 0>}
> >               finish {
> >                      ambient 0
> >                      diffuse 1
> >                      specular 1
> >                      emission 0
> >                      roughness 0.005
> >                      reflection {
> >                                 0.5
> >                                 metallic
> >                                 }
> >
> > then, gradually I'm moving the light source until z=-100000, leaving the camera
> > fixed:
> >
> > camera {
> >           perspective
> >         location <0,500,0>
> >         look_at <0,500,1000>
> >         rotate <0, 0, 0>
> >         up <0,2,0>
> >         right <2,0,0>
> >         }
> >
> > The strange issue is relative to the behaviour of the light reflected by the
> > cylinder. It seems to increase when I increase the distance between object and
> > light source. Why? There is any light attenuation defined.
> >
> > Anyone have an idea about that?
> >
> > Thank you
> >
> > Best regard
>
> Try a parallel light and the effect vanish. If I use a spotlight, the visible
> radius increase with the distance to the object. Same for the point
> light_source.

I don't know...
I've just tried it but it is still different.


Post a reply to this message

From: clipka
Subject: Re: Light Source Issue
Date: 10 Jan 2018 10:25:47
Message: <5a56307b$1@news.povray.org>
Am 10.01.2018 um 11:49 schrieb Motive17:
> Good morning to all,
> 
> I'm focusing on a quite strange issue.
> 
> I have simply defined this light source:
> 
>     light_source {
>                  <0,500,-1000>
>                  color rgb <255, 255, 255>
>                  fade_distance 1
>                  fade_power 0
>                  media_interaction off
>                  media_attenuation off
>                      }
...
> The strange issue is relative to the behaviour of the light reflected by the
> cylinder. It seems to increase when I increase the distance between object and
> light source. Why? There is any light attenuation defined.

If you move the light source in the z direction only, then as you
increase the distance, the direction of the light source is getting
closer and closer to -z, so the light source gets closer and closer to
being perpendicular to the cylinder's axis.

Thus the lit portion of the cylinder is illuminated more vertically
(with respect to the cylinder surface, not the "world").

The diffuse component of a surface becomes brighter as the surface is
illuminated more vertically.

If it was just a matter of direction, this would be perfectly realistic.


In real life, the illumination from a light source also gets dimmer as
the distance increases. To simulate this properly, you should use
`fade_power 2`.


Post a reply to this message

From: Alain
Subject: Re: Light Source Issue
Date: 10 Jan 2018 16:29:40
Message: <5a5685c4@news.povray.org>
Le 18-01-10 à 05:49, Motive17 a écrit :
> Good morning to all,
> 
> I'm focusing on a quite strange issue.
> 
> I have simply defined this light source:
> 
>      light_source {
>                   <0,500,-1000>
>                   color rgb <255, 255, 255>
>                   fade_distance 1
>                   fade_power 0 //??????
>                   media_interaction off
>                   media_attenuation off
>                       }
> 
> The strange issue is relative to the behaviour of the light reflected by the
> cylinder. It seems to increase when I increase the distance between object and
> light source. Why? There is any light attenuation defined.
> 
> Anyone have an idea about that?
> 
> Thank you
> 
> Best regards
> 
> 
> 
> 
You use fade_power 0. That mean that the light don't fade at all. It 
similar to the case where you have a large light source relative to the 
distance. By large, I mean about 100 to 1 ratio between the length of a 
side of the light relative to the distance.

If you use fade_power 1, you get light fading as a direct factor of the 
distance : Double the distance = half of the illumination. Works in a 2D 
world. Also a good approximation of a linear light source, where the 
length of the light is at least 100 times the distance to the 
illuminated object.

If you use fade_power 2, you get real world fading. At twice the 
distance, the illumination drop by a factor of 4.

Always use fade_power 2 to get realistic light fading.


Post a reply to this message

From: Motive17
Subject: Re: Light Source Issue
Date: 11 Jan 2018 06:10:01
Message: <web.5a57457bee00f7ece278d3b70@news.povray.org>
Alain <kua### [at] videotronca> wrote:
> Le 18-01-10 à 05:49, Motive17 a écrit :
> > Good morning to all,
> >
> > I'm focusing on a quite strange issue.
> >
> > I have simply defined this light source:
> >
> >      light_source {
> >                   <0,500,-1000>
> >                   color rgb <255, 255, 255>
> >                   fade_distance 1
> >                   fade_power 0 //??????
> >                   media_interaction off
> >                   media_attenuation off
> >                       }
> >
> > The strange issue is relative to the behaviour of the light reflected by the
> > cylinder. It seems to increase when I increase the distance between object and
> > light source. Why? There is any light attenuation defined.
> >
> > Anyone have an idea about that?
> >
> > Thank you
> >
> > Best regards
> >
> >
> >
> >
> You use fade_power 0. That mean that the light don't fade at all. It
> similar to the case where you have a large light source relative to the
> distance. By large, I mean about 100 to 1 ratio between the length of a
> side of the light relative to the distance.
>
> If you use fade_power 1, you get light fading as a direct factor of the
> distance : Double the distance = half of the illumination. Works in a 2D
> world. Also a good approximation of a linear light source, where the
> length of the light is at least 100 times the distance to the
> illuminated object.
>
> If you use fade_power 2, you get real world fading. At twice the
> distance, the illumination drop by a factor of 4.
>
> Always use fade_power 2 to get realistic light fading.

Thank you for the reply, Alain.

Yes, I used fade power=0 because I did not want a realistic light fading, I just
wanted no attenuation of light.


Post a reply to this message

From: Motive17
Subject: Re: Light Source Issue
Date: 12 Jan 2018 06:05:00
Message: <web.5a58961eee00f7ece278d3b70@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 10.01.2018 um 11:49 schrieb Motive17:
> > Good morning to all,
> >
> > I'm focusing on a quite strange issue.
> >
> > I have simply defined this light source:
> >
> >     light_source {
> >                  <0,500,-1000>
> >                  color rgb <255, 255, 255>
> >                  fade_distance 1
> >                  fade_power 0
> >                  media_interaction off
> >                  media_attenuation off
> >                      }
> ...
> > The strange issue is relative to the behaviour of the light reflected by the
> > cylinder. It seems to increase when I increase the distance between object and
> > light source. Why? There is any light attenuation defined.
>
> If you move the light source in the z direction only, then as you
> increase the distance, the direction of the light source is getting
> closer and closer to -z, so the light source gets closer and closer to
> being perpendicular to the cylinder's axis.
>
> Thus the lit portion of the cylinder is illuminated more vertically
> (with respect to the cylinder surface, not the "world").
>
> The diffuse component of a surface becomes brighter as the surface is
> illuminated more vertically.
>
> If it was just a matter of direction, this would be perfectly realistic.
>
>
> In real life, the illumination from a light source also gets dimmer as
> the distance increases. To simulate this properly, you should use
> `fade_power 2`.

Thank you for the reply.
I think you convinced me...


Post a reply to this message

From: Kenneth
Subject: Re: Light Source Issue
Date: 12 Jan 2018 12:35:01
Message: <web.5a58f120ee00f7eca47873e10@news.povray.org>
Alain <kua### [at] videotronca> wrote:

>
> If you use fade_power 1, you get light fading as a direct factor of the
> distance : Double the distance = half of the illumination. Works in a 2D
> world.

Thanks; that clarifies my own misconception of fade_power 1.0. For some reason,
I always assumed that it meant NO fading of the light-- like a typical power law
of, say,
   pow(7,1.0) = 7

Of course, using fade_power 1.0 in a scene DOES fade the light; I just never
knew what that fading value represented. I think the documentation's chart
example threw me off-- it shows a 'curve' for fade_power 1.0, where I was
naively expecting a straight line (at some downward angle, of course.) The
chart's X and Y axes are indeed linear-- but the X-axis represents a more
'compressed' set of values than the Y-axis... a detail that I never paid much
attention to! So the 'curve' is correct. (Personally, I would have preferred a
chart with equal values on the X and Y axes-- to show the fading behavior more
clearly.)

The one detail that's not *specifically* included in the chart is the chosen
fade_distance-- although the documentation seems to indicate that it's also 1.0.
Adding that to the chart itself would remove any ambiguity, IMO.


Post a reply to this message

From: Alain
Subject: Re: Light Source Issue
Date: 12 Jan 2018 16:13:14
Message: <5a5924ea@news.povray.org>
Le 18-01-12 à 12:32, Kenneth a écrit :
> Alain <kua### [at] videotronca> wrote:
> 
>>
>> If you use fade_power 1, you get light fading as a direct factor of the
>> distance : Double the distance = half of the illumination. Works in a 2D
>> world.
> 
> Thanks; that clarifies my own misconception of fade_power 1.0. For some reason,
> I always assumed that it meant NO fading of the light-- like a typical power law
> of, say,
>     pow(7,1.0) = 7

For fade_power 1,
it's fade_distance/pow(Distance, 1) = fade_distance/Distance

For fade_power 0,
it becomes fade_distance/pow(Distance,0) = fade_distance/1

> 
> Of course, using fade_power 1.0 in a scene DOES fade the light; I just never
> knew what that fading value represented. I think the documentation's chart
> example threw me off-- it shows a 'curve' for fade_power 1.0, where I was
> naively expecting a straight line (at some downward angle, of course.) The
> chart's X and Y axes are indeed linear-- but the X-axis represents a more
> 'compressed' set of values than the Y-axis... a detail that I never paid much
> attention to! So the 'curve' is correct. (Personally, I would have preferred a
> chart with equal values on the X and Y axes-- to show the fading behavior more
> clearly.)
> 
> The one detail that's not *specifically* included in the chart is the chosen
> fade_distance-- although the documentation seems to indicate that it's also 1.0.
> Adding that to the chart itself would remove any ambiguity, IMO.
> 
> 
> 
> 
Usually, for an area_light, you want to use fade_distance = size od the 
area_light.
Otherwise, you can use fade_distance 1 for large scenes or far lights, 
and 0.1 or less for lights that are very close to the closest surface.


Post a reply to this message

From: Stephen
Subject: Re: Light Source Issue
Date: 12 Jan 2018 16:29:48
Message: <5a5928cc$1@news.povray.org>
On 12/01/2018 21:13, Alain wrote:
>>
> Usually, for an area_light, you want to use fade_distance = size od the 
> area_light.
> Otherwise, you can use fade_distance 1 for large scenes or far lights, 
> and 0.1 or less for lights that are very close to the closest surface.

Thanks, I did not know that.

-- 

Regards
     Stephen


Post a reply to this message

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