POV-Ray : Newsgroups : povray.advanced-users : light_group inconsistency? Server Time
29 Oct 2024 22:46:11 EDT (-0400)
  light_group inconsistency? (Message 1 to 3 of 3)  
From: Reactor
Subject: light_group inconsistency?
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

From: Darren New
Subject: Re: light_group inconsistency?
Date: 22 Mar 2009 16:02:42
Message: <49c69962$1@news.povray.org>
Reactor wrote:
> but they always cast a shadow from global light_sources.

I don't know if this has any relevance, but there's actually three objects 
to be considered: The light, the object casting the shadow, and the object 
the shadow is cast upon.

In other words, if the statue casts a shadow on the floor, perhaps it's 
because the *floor* is illuminated by global lights, even if the statue isn't.

-- 
   Darren New, San Diego CA, USA (PST)
   My fortune cookie said, "You will soon be
   unable to read this, even at arm's length."


Post a reply to this message

From: Reactor
Subject: Re: light_group inconsistency?
Date: 22 Mar 2009 16:40:01
Message: <web.49c6a15b55c0a5ffab66910f0@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Reactor wrote:
> > but they always cast a shadow from global light_sources.
>
> I don't know if this has any relevance, but there's actually three objects
> to be considered: The light, the object casting the shadow, and the object
> the shadow is cast upon.
>
> In other words, if the statue casts a shadow on the floor, perhaps it's
> because the *floor* is illuminated by global lights, even if the statue isn't.
>
> --
>    Darren New, San Diego CA, USA (PST)
>    My fortune cookie said, "You will soon be
>    unable to read this, even at arm's length."

That is an interesting perspective that I hadn't considered, but I think my
expectation was that the illumination and shadows would be together.  That is,
if a light doesn't illuminate an object, then it probably shouldn't be shadowed
by it, either.

-Reactor


Post a reply to this message

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