POV-Ray : Newsgroups : povray.general : Fade Cutoff Server Time
30 Jul 2024 02:15:25 EDT (-0400)
  Fade Cutoff (Message 1 to 10 of 26)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Christian Froeschlin
Subject: Fade Cutoff
Date: 11 Apr 2010 10:11:32
Message: <4bc1d894$1@news.povray.org>
I just tried complementing fade_power and fade_distance for
light_sources with an experimental new keyword

   fade_cutoff_distance

and then simply ignoring all light_sources which are farther
away from a given point. The idea is that fading light sources
may be needlessly considered in the calculation even if they
are so far away that they no longer contribute noticably.

In a rather contrived test scene with a grid of 100 glowing
spheres over a checkered plane (each containing an actual fading
light_source) this sped things up by a factor of 10 without
noticably altering the output.

Do you think this would be a useful feature for real scenes?
I'm thinking of candles and other localized glows here.

Should it be used by photons as well? For them it might just
create additional overhead without speedup (except if you have
multiple photon sources and photon targets, then you could
simply ignore certain combinations due to target distance).

Would it also be useful for interior fading? Possibly for
objects which are so "dense" that they do not let light pass
except at their thinnest parts (so for all rays traversing
the object for more than the cutoff distance the color can
be set to black without continuing the tracing).

My current version is a simple change in Trace::ComputeOneLightRay:

   double cutoff_dist_sqr = lightsource->Fade_Cutoff_Distance_Sqr;

   if (cutoff_dist_sqr > 0.0 &&
       (ipoint - Vector3d(lightsource->Center)).lengthSqr() >
        cutoff_dist_sqr)
   {
     lightcolour = RGBColour();
     return;
   }


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Fade Cutoff
Date: 11 Apr 2010 10:29:38
Message: <4bc1dcd2$1@news.povray.org>
Christian Froeschlin wrote:

> My current version is a simple change in Trace::ComputeOneLightRay:

And it will probably need to be adapted to work properly
with fading area_illumination, but that seems to be an open
issue in the bug tracker anyway.


Post a reply to this message

From: John VanSickle
Subject: Re: Fade Cutoff
Date: 11 Apr 2010 12:08:19
Message: <4bc1f3f3@news.povray.org>
Christian Froeschlin wrote:

> Do you think this would be a useful feature for real scenes?
> I'm thinking of candles and other localized glows here.

The only issue I have is that there is probably some way to accomplish 
this using light groups; but this is a quick-and-simple way for the 
modeling artist to accomplish the time savings, so perhaps a bit of 
redundancy is acceptable.

Regards,
John


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Fade Cutoff
Date: 11 Apr 2010 13:11:35
Message: <4bc202c7$1@news.povray.org>
John VanSickle wrote:

> The only issue I have is that there is probably some way to accomplish 
> this using light groups; but this is a quick-and-simple way for the 
> modeling artist to accomplish the time savings, so perhaps a bit of 
> redundancy is acceptable.

true, in most cases there will also be a way to achieve the same
result with light groups. But it may require a lot of manual work,
for example, if a candle illuminates part of the wall of the room,
you'd need to cut that segment out and put it into the light_group.

Also, if you wish to move objects or light_sources you will then
have to restructure your entire scene. I'm not sure how modeling
artists think about this but software developers don't like it ;)


Post a reply to this message

From: clipka
Subject: Re: Fade Cutoff
Date: 11 Apr 2010 19:44:30
Message: <4bc25ede$1@news.povray.org>
Am 11.04.2010 16:15, schrieb Christian Froeschlin:
> I just tried complementing fade_power and fade_distance for
> light_sources with an experimental new keyword
>
> fade_cutoff_distance
>
> and then simply ignoring all light_sources which are farther
> away from a given point. The idea is that fading light sources
> may be needlessly considered in the calculation even if they
> are so far away that they no longer contribute noticably.

How about automatically computing this from light brightness and 
adc_bailout?


Post a reply to this message

From: Warp
Subject: Re: Fade Cutoff
Date: 12 Apr 2010 07:51:00
Message: <4bc30923@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> How about automatically computing this from light brightness and 
> adc_bailout?

  I don't think you can because how visible the lighting is depends on the
color of the surface being lighted. If the color is very bright, it will be
more easily visible than if it's dark.

-- 
                                                          - Warp


Post a reply to this message

From: clipka
Subject: Re: Fade Cutoff
Date: 12 Apr 2010 09:56:36
Message: <4bc32694@news.povray.org>
Am 12.04.2010 13:51, schrieb Warp:

>> How about automatically computing this from light brightness and
>> adc_bailout?
>
>    I don't think you can because how visible the lighting is depends on the
> color of the surface being lighted. If the color is very bright, it will be
> more easily visible than if it's dark.

That, while being true, shouldn't prevent from computing a fade cutoff 
distance where the light will no longer have any noticeable effect on a 
worst-case" surface (e.g. weight = 1.0).


Post a reply to this message

From: Warp
Subject: Re: Fade Cutoff
Date: 12 Apr 2010 10:33:48
Message: <4bc32f4c@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> That, while being true, shouldn't prevent from computing a fade cutoff 
> distance where the light will no longer have any noticeable effect on a 
> worst-case" surface (e.g. weight = 1.0).

  Remember that you can have surface colors which are larger than 1.0.

-- 
                                                          - Warp


Post a reply to this message

From: clipka
Subject: Re: Fade Cutoff
Date: 12 Apr 2010 10:52:53
Message: <4bc333c5$1@news.povray.org>
Am 12.04.2010 16:33, schrieb Warp:
> clipka<ano### [at] anonymousorg>  wrote:
>> That, while being true, shouldn't prevent from computing a fade cutoff
>> distance where the light will no longer have any noticeable effect on a
>> worst-case" surface (e.g. weight = 1.0).
>
>    Remember that you can have surface colors which are larger than 1.0.

Sure. So?

You should adjust adc_bailout accordingly for such scenes anyway.


Post a reply to this message

From: John VanSickle
Subject: Re: Fade Cutoff
Date: 12 Apr 2010 16:57:46
Message: <4bc3894a$1@news.povray.org>
Warp wrote:
> clipka <ano### [at] anonymousorg> wrote:
>> How about automatically computing this from light brightness and 
>> adc_bailout?
> 
>   I don't think you can because how visible the lighting is depends on the
> color of the surface being lighted. If the color is very bright, it will be
> more easily visible than if it's dark.

There is also the possibility that the modeling artist wants to model 
the effect of a large quantity of distant light sources.  The bailout 
mechanism will cull some light sources and not others, and in a way that 
could produce visible artifacts.

Regards,
John


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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