POV-Ray : Newsgroups : povray.beta-test : area_illuminate bug : Re: area_illuminate bug Server Time
28 Jul 2024 18:12:09 EDT (-0400)
  Re: area_illuminate bug  
From: Slime
Date: 16 Jan 2008 23:57:22
Message: <478ee032$1@news.povray.org>
> 3) Just treat the area light as if it was a basic grid of point lights
>    which results in perfect lighting (at least if the grid is dense
enough),
>    but there would be absolutely no speed benefit in having a specialized
>    area_illumination feature as the exact same effect (including
speedwise)
>    could be accomplished by simply creating a grid of point lights.

Why is that? I thought the speed benefit came from the adaptive sampling.
You can still do the adaptive sampling, but you basically move the normal
dot product check to the point where you trace an individual ray. So instead
of

if ( CheckNormalDirection( lightCenter ) || doubleIlluminated )
{
  For each samplePoint in ComplicatedAdaptiveSampling()
  {
    TraceShadowRay( samplePoint )
  }
}

you have

For each sample point in ComplicatedAdaptiveSampling()
{
  if ( CheckNormalDirection( samplePoint ) || doubleIlluminated )
  {
    TraceShadowRay( samplePoint )
  }
}

Obviously I've simplified the problem a lot so it might not be that easy,
but it seems like all you have to do is take the current implementation and,
if double illumination is off, add a dot product check between the normal
and the direction to the sample point before tracing a shadow ray.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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