POV-Ray : Newsgroups : povray.general : Fade Cutoff : Fade Cutoff Server Time
30 Jul 2024 00:31:21 EDT (-0400)
  Fade Cutoff  
From: Christian Froeschlin
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

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