POV-Ray : Newsgroups : povray.advanced-users : light_group inconsistency? : light_group inconsistency? Server Time
3 Jul 2024 05:04:47 EDT (-0400)
  light_group inconsistency?  
From: Reactor
Date: 22 Mar 2009 15:20:00
Message: <web.49c68e7ae1318642ab66910f0@news.povray.org>
While working on a scene, I noticed what I perceive to be an inconsistency in
the way light_groups behave with global lights.  Specifically, the objects in
the light_group may or may not be illuminated by global lights as specified by
the user, but they always cast a shadow from global light_sources.  Using the
no_shadow keyword for the object also turns off the objects' shadows from the
light_sources within the light_group, which may be/is undesirable.

After reading the docs, I wasn't sure whether this was a bug or just a different
way of thinking of things, since the docs describe it as a way of controlling
the scene brightness by selectively illuminating objects.  They mention the
lights in a group do not contribute to global scene lighting, but do not really
mention shadows.

At this point, I think the shadows should be selected, too, perhaps by a
global_shadows keyword, but what I want to know first is whether or not I am
Doing It Wrong, and there already is a way to keep the shadows within the
light_group without global light shadows.


/*  EXAMPLE CODE:
** Simple example scene illustrating light_group issue
**
** Scene Description: 2 light groups, each containing a
**    single colored light source and a white sphere.
**    One has global_lights on, the other has it off.
**    In both cases, the spheres cast shadows for the
**    global light.
*/

light_source{ // global light
    <100,75,-75> * 100,
    color rgb <1,1,1>
}


light_group // red light group
{
    sphere{
        <0,0,0>, 1
        pigment{ color rgb <1,1,1> }
    }

    light_source{
        <0,5,0>,
        color rgb <1,0,0>
    }
global_lights off
translate <-1.5,1,0>
}


light_group // blue light group
{
    sphere{
        <0,0,0>, 1
        pigment{ color rgb <1,1,1> }
    }

    light_source{
        <0,5,0>,
        color rgb <0,0,1>
    }
global_lights on
translate <1.5,1,0>
}


plane{
    y, 0
    pigment{ color rgb <1,1,1> }
}

background{ color rgb <0.75,0.875,1.00> }

camera
{
    location    <0,3,-5>
    look_at     <0,1,0>
}



-Reactor


Post a reply to this message

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