POV-Ray : Newsgroups : povray.general : 'Limited' light_source? Server Time
5 Nov 2024 05:22:00 EST (-0500)
  'Limited' light_source? (Message 1 to 10 of 10)  
From: Mark Birch
Subject: 'Limited' light_source?
Date: 6 Oct 2007 18:45:00
Message: <web.47080cc221ef7332e15a46a80@news.povray.org>
I would like to see support for light sources with a limited range.

Say I want do do a scene with a large number of light sources, which cast
shadows & interact with any media & surface normals, but only influence a
small area around them (faking the effect with glows or media would not do
this).

For example a suburban night scene with lots of roads & streetlights &
houses, or a large spaceship with self-illuminating lights.

If I use fade_power, I get the proper effect, but povray will perform shadow
tests on every single light source in the scene, regardless of how much
influence they have on the final colour of the rendered pixel.  This leads
to *painfully* slow render times.  Light groups can be are useful, but
aren't always suitable for the interactions I want to achieve.

What I suggest is a light source with a limited range, so that before any
shadow tests are done, povray first checks to see if each light source has
a 'limited' flag, and if it is in range of the pixel being rendered.  Any
light sources out of current range are ignored.

This would produce a visible cutoff line where each light reaches the limit
of it's 'sphere of influence' even with fade_power applied, so the effect
would need to be similar to the spotlight; with radius, falloff & tightness
parameters to smoothly fade out the light.

Does anyone else think this is worth implementing?


(PS: I am not a programmer, so I won't be writing a patch for this anytime
soon).


Post a reply to this message

From: Warp
Subject: Re: 'Limited' light_source?
Date: 6 Oct 2007 19:49:07
Message: <47081ef3@news.povray.org>
http://povray.org/documentation/view/3.6.1/320/

  (Btw, are you sure shadow testing is done for fading lights regarldess
of distance?)

-- 
                                                          - Warp


Post a reply to this message

From: Rune
Subject: Re: 'Limited' light_source?
Date: 7 Oct 2007 02:29:29
Message: <47087cc9$1@news.povray.org>
Warp wrote:
> http://povray.org/documentation/view/3.6.1/320/

Mark Birch wrote:
> Light groups can be are useful, but
> aren't always suitable for the interactions I want to achieve.

For example, if the spaceship lands on the road, it would be nice if its 
light illuminate it - actually the lights should illuminate *everything* 
within a range, which makes light_groups impractical.

>  (Btw, are you sure shadow testing is done for fading lights regarldess
> of distance?)

Diffuse lighting without shadow testing is meaningless when the shadowless 
keyword is not used. Why would you even ask a question like that?

(I don't really mean the above answer, but you should know that your own 
answers are sometimes like this when people formulate questions that are not 
100% precise.)

Rune


Post a reply to this message

From: Warp
Subject: Re: 'Limited' light_source?
Date: 7 Oct 2007 05:38:44
Message: <4708a923@news.povray.org>
Rune <aut### [at] runevisioncom> wrote:
> >  (Btw, are you sure shadow testing is done for fading lights regarldess
> > of distance?)

> Diffuse lighting without shadow testing is meaningless when the shadowless 
> keyword is not used. Why would you even ask a question like that?

  I'm not exactly sure what you are asking here.

  What I asked is if he is sure that shadow tests are really performed
for fading lights which are farther away from the current point than the
maximum distance the light source would have an effect from.

> (I don't really mean the above answer, but you should know that your own 
> answers are sometimes like this when people formulate questions that are not 
> 100% precise.)

  I don't really understand that sentence.

-- 
                                                          - Warp


Post a reply to this message

From: Rune
Subject: Re: 'Limited' light_source?
Date: 7 Oct 2007 06:31:55
Message: <4708b59b$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message 
news:4708a923@news.povray.org...
> Rune <aut### [at] runevisioncom> wrote:
>> >  (Btw, are you sure shadow testing is done for fading lights regarldess
>> > of distance?)
>
>> Diffuse lighting without shadow testing is meaningless when the 
>> shadowless
>> keyword is not used. Why would you even ask a question like that?
>
>  I'm not exactly sure what you are asking here.
>
>  What I asked is if he is sure that shadow tests are really performed
> for fading lights which are farther away from the current point than the
> maximum distance the light source would have an effect from.

Actually no, you just said "regarldess of distance", not mentioning any 
maximum distance at all. How would you define "the maximum distance the 
light source would have an effect from"? Using the ADC-bailout threshold? Or 
floating point precision error threshold? Or...? It's not at all clear what 
you're talking about.

Rune


Post a reply to this message

From: Warp
Subject: Re: 'Limited' light_source?
Date: 7 Oct 2007 07:58:41
Message: <4708c9f1@news.povray.org>
Rune <aut### [at] runevisioncom> wrote:
> Actually no, you just said "regarldess of distance", not mentioning any 
> maximum distance at all.

  What I said was "are you sure that shadow tests are always done with a
fading light regardless of distance". Or in other words, "are you sure
POV-Ray doesn't have a check that if a fading light source is far enough,
it doesn't skip doing shadow tests".

  I don't really understand how you misunderstood what I said.

> How would you define "the maximum distance the 
> light source would have an effect from"?

  With a simple mathematical formula. From the light source parameters
you can calculate what is the distance at which the effect of the light
source drops below negligible.

-- 
                                                          - Warp


Post a reply to this message

From: Rune
Subject: Re: 'Limited' light_source?
Date: 7 Oct 2007 08:20:39
Message: <4708cf17$1@news.povray.org>
"Warp" wrote:
> Rune wrote:
>> Actually no, you just said "regarldess of distance", not mentioning any
>> maximum distance at all.
>
>  What I said was "are you sure that shadow tests are always done with a
> fading light regardless of distance". Or in other words, "are you sure
> POV-Ray doesn't have a check that if a fading light source is far enough,
> it doesn't skip doing shadow tests".
>
>  I don't really understand how you misunderstood what I said.

I didn't misunderstand anything, but are using expressions that are not well 
defined.

>> How would you define "the maximum distance the
>> light source would have an effect from"?
>
>  With a simple mathematical formula. From the light source parameters
> you can calculate what is the distance at which the effect of the light
> source drops below negligible.

You didn't answer the question, so I ask again: What is negligible? Anything 
below the ADC-bailout threshold? Or the
floating point precision error threshold? Or the internal EPSILON threshold?

And what if there are many light_sources close to each other, so that any 
single one is negligible at distance X, but combined their effect is 
significant?

Rune


Post a reply to this message

From: honnza
Subject: Re: 'Limited' light_source?
Date: 7 Oct 2007 11:10:00
Message: <web.4708f59e44fef6fea9ce4df50@news.povray.org>
"Rune" <aut### [at] runevisioncom> wrote:
> "Warp" wrote:
> > Rune wrote:
> >> Actually no, you just said "regarldess of distance", not mentioning any
> >> maximum distance at all.
> >
> >  What I said was "are you sure that shadow tests are always done with a
> > fading light regardless of distance". Or in other words, "are you sure
> > POV-Ray doesn't have a check that if a fading light source is far enough,
> > it doesn't skip doing shadow tests".
> >
> >  I don't really understand how you misunderstood what I said.
>
> I didn't misunderstand anything, but are using expressions that are not well
> defined.
>
> >> How would you define "the maximum distance the
> >> light source would have an effect from"?
> >
> >  With a simple mathematical formula. From the light source parameters
> > you can calculate what is the distance at which the effect of the light
> > source drops below negligible.
>
> You didn't answer the question, so I ask again: What is negligible? Anything
> below the ADC-bailout threshold? Or the
> floating point precision error threshold? Or the internal EPSILON threshold?
>
IMHO ADC ;-)
>
> And what if there are many light_sources close to each other, so that any
> single one is negligible at distance X, but combined their effect is
> significant?
>
these should be made area. Or you can use a lower bailout value (maybe a
light should accept the ADC_bailout keyword).
>
> Rune


Post a reply to this message

From: Alain
Subject: Re: 'Limited' light_source?
Date: 7 Oct 2007 15:48:41
Message: <47093819$1@news.povray.org>
honnza nous apporta ses lumieres en ce 2007/10/07 11:05:
> "Rune" <aut### [at] runevisioncom> wrote:
>> "Warp" wrote:
>>> Rune wrote:
>>>> Actually no, you just said "regarldess of distance", not mentioning any
>>>> maximum distance at all.
>>>  What I said was "are you sure that shadow tests are always done with a
>>> fading light regardless of distance". Or in other words, "are you sure
>>> POV-Ray doesn't have a check that if a fading light source is far enough,
>>> it doesn't skip doing shadow tests".
>>>
>>>  I don't really understand how you misunderstood what I said.
>> I didn't misunderstand anything, but are using expressions that are not well
>> defined.
>>
>>>> How would you define "the maximum distance the
>>>> light source would have an effect from"?
>>>  With a simple mathematical formula. From the light source parameters
>>> you can calculate what is the distance at which the effect of the light
>>> source drops below negligible.
>> You didn't answer the question, so I ask again: What is negligible? Anything
>> below the ADC-bailout threshold? Or the
>> floating point precision error threshold? Or the internal EPSILON threshold?
>>
> IMHO ADC ;-)
>> And what if there are many light_sources close to each other, so that any
>> single one is negligible at distance X, but combined their effect is
>> significant?
>>
> these should be made area. Or you can use a lower bailout value (maybe a
> light should accept the ADC_bailout keyword).
>> Rune
> 
> 
> 
> 
Making several "close together" light is not always advisable. Just imagine that 
those lights are placed irregularly, and only visualy close while been actualy 
far appart from each other. An example would be a line of street lights placed 
every 100m, placed 2 Km away in a line close to the line of sight. One would not 
contribute to your shadow, but 100 of those can very well cast a notable shadow.

-- 
Alain
-------------------------------------------------
'Hurhurhur, 2400 baud sucks' - V.bis and Baudhead


Post a reply to this message

From: Mark Birch
Subject: Re: 'Limited' light_source?
Date: 8 Oct 2007 00:30:01
Message: <web.4709b1a744fef6fe4daddc090@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> http://povray.org/documentation/view/3.6.1/320/
>
>   (Btw, are you sure shadow testing is done for fading lights regarldess
> of distance?)
>
> --
>                                                           - Warp

Not 100% sure, but 99% sure.

Even with fading applied, the light strength will never actually reach zero
regardless of the distance from the light source.  Which leaves only an
imposed threshold like ADC bailout to omit any lights from the scene.

From the documentation, it appears that ADC bailout is only applied to
reflections & refractions.


Post a reply to this message

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