POV-Ray : Newsgroups : povray.advanced-users : area_light, looks_like, & auto bounding problem : area_light, looks_like, & auto bounding problem Server Time
3 Jul 2024 04:49:32 EDT (-0400)
  area_light, looks_like, & auto bounding problem  
From: Kenneth
Date: 12 Dec 2008 22:25:01
Message: <web.4943287c3080a53478dcad930@news.povray.org>
I stumbled upon this in v3.6.1c while running an animation. Didn't see this
specific set of interrelated circumstances mentioned in a google search, or
in the 3.7 beta fixes.

If an area_light has a looks_like object, and that object is as large or larger
than the area_light grid size, the render takes at least twice as long as
without it, for even the simplest object. (The entire image takes longer to
render.)  It's as if the program is doing some unneeded calculations (shadow
calculations?) even though the object has an implied no_shadow. Actually, this
slow-down occurs with *any* no_shadow object that happens to invade the
area_light's 'volume of space.'

The problem only shows up if automatic bounding is on; otherwise not. (Since
most scenes have enough objects to turn it ON, it's definitely annoying.) For
my tests, I turned Bounding_Threshold to zero (so it's 'on' regardless of the
number of objects), then switched Bounding on or off.

On a more detailed level: Given that jitter is OFF in the light (for
simplicity's sake), if the object is made small enough to fit 'inbetween' the
grid of lights, the problem almost disappears. As the object size increases,
enclosing more and more light points, the render time starts increasing.  (I
realize that an area_light is, in reality, just a single point_light source;
but this effect does seem to take into account its 'multiple' points.) From a
practical standpoint, a complex object may or may not enclose some of the
lights, depending on the object's shape and size. And with jitter ON, I really
don't know *what* happens!

Adding an *additional* no_shadow to the looks_like object didn't help. (BTW,
making the area_light shadowless eliminates the entire problem, whether auto
bounding is on OR off.)

Not sure if circular or orient affects this, since my own looks_like test object
is just a simple sphere (where those terms wouldn't matter?) I'm guessing that
they might have an effect when using a more complex shape. Fade_distance and
fade_power don't seem to affect it either, although I haven't run enough tests
to positively say yea or nay.

BTW, this strange problem isn't there with a regular point_light source, even
though its look_like object always encloses the light.

Here is a very simple test scene, stripped to its essence, to show the effect.
(The looks_like object takes up very little screen space.) With a 6X6
area_light grid, there isn't a light 'point' in the exact center, so it's good
for testing.  A sphere of < .100 radius will enclose NO lights; a radius > .707
will enclose ALL the lights. The test renders very quickly, so you will probably
need to run an animation--of, say, 50 frames--to see the  render time
differences.

These are my own full animation-render times, in minutes:
1:05 auto bounding OFF, no looks_like
1:05 auto bounding OFF, with looks_like, radius .71 (no change)
1:48 auto bounding ON, no looks_like (an expected difference)
2:02 auto bounding ON, with looks_like, radius .09  (not much difference)
4:43 auto bounding ON, with looks_like, radius .71  (big difference)
4:43 auto bounding ON, with looks_like, radius 1.3 (no change)

Ken W.

-------
camera {
  perspective
  location  <0, 1, -55>
  look_at   <0, .2, 0>
  right     x*image_width/image_height
  angle 37
}


light_source {
  0*x
  color rgb .9
  area_light
  <1, 0, 0> <0, 0, 1>
  6, 6
  adaptive 1
  //jitter // Turned off so that the light points remain in a fixed grid.
  circular
  orient
  //shadowless
  looks_like{
          sphere{0,.71 // change radius to see effect
             texture{
                 pigment{color rgb <.5,.5,1>}
                 finish{ambient 1 diffuse 0}
                    }
                }
            }
  translate <0, 2, -3>
          }


// background box
box{0,40 no_shadow translate -20 scale <1,1,.01>
 texture{
       pigment{color rgb 1}
       finish{ambient 0 diffuse 1}
        }
 translate 3*z
   }


Post a reply to this message

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