POV-Ray : Newsgroups : povray.beta-test : v3.7.1 beta 5-- light_group problem? Server Time
21 Dec 2024 12:17:08 EST (-0500)
  v3.7.1 beta 5-- light_group problem? (Message 1 to 10 of 24)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Kenneth
Subject: v3.7.1 beta 5-- light_group problem?
Date: 30 Apr 2017 11:10:00
Message: <web.5905fcf6ecd03e1c883fb31c0@news.povray.org>
(using Windows 7 64-bit)

I haven't used a light_group in a long time, so I can't remember exactly what
its behavior was in v3.62, but I don't think it's working correctly in the beta.
I've included a test scene below.

Although the light_group's light does not appear on objects outside the group
(which is correct), it's still casting shadows from those objects, onto the
object in the light_group. Is that proper behavior? I don't recall a similar
problem in v3.62 (although I could be wrong.) The included documentation doesn't
mention shadow behavior (except as relates to scattering media.)

Also, the light's looks_like object (yellow sphere) is showing lighting effects
from the extra 'global light', even with 'global_lights off' in the light_group
(although there's no shadow from that sphere, as far as I can tell.) I don't
know if that is correct behavior or not.

--------
#version 3.71;

global_settings{assumed_gamma 1.0 max_trace_level 5}

camera {
  perspective
  location  <0, 0, -3.5>
  look_at   <0, 0,  0>
  right     x*image_width/image_height
  angle 35
}

background {rgb .2}

// the extra 'global light'-- up and to the left
light_source {
  0*x
  color rgb <1,1,1>
  translate <-30, 30, -10>
             }


light_group{
light_source {
  0*x
  color rgb 80000*<1,.5,.5>
  fade_power 1.5
  fade_distance .001
  looks_like{
     sphere{0,.03 texture{pigment{rgb <1,.8,0>}finish{ambient 0 diffuse .9}}}
            }
  translate <.09, .2, -.06>
             }
plane{y,-.61
    texture{
         pigment{
              cells
              scale .5
              color_map{
                   [0 rgb .5]
                   [1 rgb 1]
                       }
                }
         finish{
              ambient 0
              diffuse .4
               }
           }
     }
  // global_lights on
           }


// tall thin box
#declare TALL_BOX =
box{<-.02,-1,-.02>, <.02,1,.02>
    texture{
        pigment{rgb <.4,1,.4>}
        finish{ambient 0 diffuse .9}
           }
        rotate 30*y
   }

object{TALL_BOX}

object{TALL_BOX
rotate 80*x
translate <-.3,-.3,.3>
      }


Post a reply to this message

From: Alain
Subject: Re: v3.7.1 beta 5-- light_group problem?
Date: 30 Apr 2017 12:15:32
Message: <59060da4$1@news.povray.org>
Le 17-04-30 à 11:04, Kenneth a écrit :
> (using Windows 7 64-bit)
> 
> I haven't used a light_group in a long time, so I can't remember exactly what
> its behavior was in v3.62, but I don't think it's working correctly in the beta.
> I've included a test scene below.
> 
> Although the light_group's light does not appear on objects outside the group
> (which is correct), it's still casting shadows from those objects, onto the
> object in the light_group. Is that proper behavior? I don't recall a similar
> problem in v3.62 (although I could be wrong.) The included documentation doesn't
> mention shadow behavior (except as relates to scattering media.)

This is the correct and expected behaviour and did not change since 
light_group have been introduced.

> 
> Also, the light's looks_like object (yellow sphere) is showing lighting effects
> from the extra 'global light', even with 'global_lights off' in the light_group
> (although there's no shadow from that sphere, as far as I can tell.) I don't
> know if that is correct behavior or not.

Can't tell for that part, but it brobably did not change.

> 
> --------
> #version 3.71;
> 
> global_settings{assumed_gamma 1.0 max_trace_level 5}
> 
> camera {
>    perspective
>    location  <0, 0, -3.5>
>    look_at   <0, 0,  0>
>    right     x*image_width/image_height
>    angle 35
> }
> 
> background {rgb .2}
> 
> // the extra 'global light'-- up and to the left
> light_source {
>    0*x
>    color rgb <1,1,1>
>    translate <-30, 30, -10>
>               }
> 
> 
> light_group{
> light_source {
>    0*x
>    color rgb 80000*<1,.5,.5>
>    fade_power 1.5
>    fade_distance .001
>    looks_like{
>       sphere{0,.03 texture{pigment{rgb <1,.8,0>}finish{ambient 0 diffuse .9}}}
>              }
>    translate <.09, .2, -.06>
>               }
> plane{y,-.61
>      texture{
>           pigment{
>                cells
>                scale .5
>                color_map{
>                     [0 rgb .5]
>                     [1 rgb 1]
>                         }
>                  }
>           finish{
>                ambient 0
>                diffuse .4
>                 }
>             }
>       }
>    // global_lights on
>             }
> 
> 
> // tall thin box
> #declare TALL_BOX =
> box{<-.02,-1,-.02>, <.02,1,.02>
>      texture{
>          pigment{rgb <.4,1,.4>}
>          finish{ambient 0 diffuse .9}
>             }
>          rotate 30*y
>     }
> 
> object{TALL_BOX}
> 
> object{TALL_BOX
> rotate 80*x
> translate <-.3,-.3,.3>
>        }
> 
>


Post a reply to this message

From: Kenneth
Subject: Re: v3.7.1 beta 5-- light_group problem?
Date: 30 Apr 2017 19:45:00
Message: <web.590675adcb5fff94883fb31c0@news.povray.org>
Alain <kua### [at] videotronca> wrote:

>
> This is the correct and expected behaviour and did not change since
> light_group have been introduced.
>

I'm having trouble understanding the logic of this; but maybe it will become
clearer to me, as I continue to think about it. ;-)

Long ago, I wrote and archived several light_group 'test scenes' (with lots of
notes to myself about its behavior), but I can't find the files.  :-(


Post a reply to this message

From: Thomas de Groot
Subject: Re: v3.7.1 beta 5-- light_group problem?
Date: 1 May 2017 02:57:44
Message: <5906dc68$1@news.povray.org>
On 1-5-2017 1:40, Kenneth wrote:
> Alain <kua### [at] videotronca> wrote:
>
>>
>> This is the correct and expected behaviour and did not change since
>> light_group have been introduced.
>>
>
> I'm having trouble understanding the logic of this; but maybe it will become
> clearer to me, as I continue to think about it. ;-)
>
> Long ago, I wrote and archived several light_group 'test scenes' (with lots of
> notes to myself about its behavior), but I can't find the files.  :-(
>
>

I agree with you. Intuitively I would say that this shadow behaviour is 
not correct. It annihilates imho one of the fundamental reasons to use 
light_group in the first place.

-- 
Thomas


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: v3.7.1 beta 5-- light_group problem?
Date: 1 May 2017 03:45:01
Message: <web.5906e680cb5fff94a3977ae70@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> Alain <kua### [at] videotronca> wrote:
>
> >
> > This is the correct and expected behaviour and did not change since
> > light_group have been introduced.
> >
>
> I'm having trouble understanding the logic of this; but maybe it will become
> clearer to me, as I continue to think about it. ;-)

You need to consider the purpose of light groups: They exist to allow additional
local lights for objects, a technique that is frequently used in computer
animations to help make certain objects appear lit "better" - after all, there
is no physical equivalent of light groups in the real world.

What you are looking for is something like "shadow groups", though I suppose you
might want to rethink what you actually want to render.


Post a reply to this message

From: Thomas de Groot
Subject: Re: v3.7.1 beta 5-- light_group problem?
Date: 1 May 2017 07:20:47
Message: <59071a0f$1@news.povray.org>
On 1-5-2017 9:40, Thorsten Froehlich wrote:
> "Kenneth" <kdw### [at] gmailcom> wrote:
>> Alain <kua### [at] videotronca> wrote:
>>
>>>
>>> This is the correct and expected behaviour and did not change since
>>> light_group have been introduced.
>>>
>>
>> I'm having trouble understanding the logic of this; but maybe it will become
>> clearer to me, as I continue to think about it. ;-)
>
> You need to consider the purpose of light groups: They exist to allow additional
> local lights for objects, a technique that is frequently used in computer
> animations to help make certain objects appear lit "better" - after all, there
> is no physical equivalent of light groups in the real world.
>
> What you are looking for is something like "shadow groups", though I suppose you
> might want to rethink what you actually want to render.
>
>

As for me, that clarifies a lot indeed. Use a bit different than I 
expected. I have used light_group is a somewhat different context with a 
reddish sundown landscape and a 'midday' lighted moon. I think I got 
some unwanted artefacts but I resolved them with no_shadow and 
no_reflection.

-- 
Thomas


Post a reply to this message

From: Kenneth
Subject: Re: v3.7.1 beta 5-- light_group problem?
Date: 1 May 2017 13:50:06
Message: <web.5907752acb5fff94883fb31c0@news.povray.org>
"Thorsten Froehlich" <nomail@nomail> wrote:

>
> You need to consider the purpose of light groups: They exist to allow additional
> local lights for objects, a technique that is frequently used in computer
> animations to help make certain objects appear lit "better" -

That's basically what the documentation says, although the behavior of shadows
vis-a-vis a light_group isn't discussed there-- which seems like an important
topic, as shadow behavior may be 'unexpected', in an intuitive sense. (Well, at
least for me-- and maybe Thomas as well.) My immediate intuition when reading
the docs is basically this: that a light_group should *only* light the objects
in the group, AND *only* those objects should cast shadows from that light.
Obviously, it doesn't work according to my intuition...  ;-) I admit that I
haven't completely thought through the ramifications of my idea; there may
indeed be some logical conundrums with it. But its present behavior seems like a
conundrum (to me.)
>
> What you are looking for is something like "shadow groups", though I
> suppose you might want to rethink what you actually want to render.

That's very possible (and I could probably find a work-around to the scene
problem I encountered, using no_image and/or no_shadow as Thomas mentioned.) My
current scene-- which prompted me to post about this-- is an animation of an
expanding  'explosion' on the top of a tower (like the old A-bomb tests.) I
wanted a VERY bright fading light to flare on the ground (and only there), from
a position at the center of the explosion, so I made a light_group with the
ground-- but found that the explosion sphere and the tower were casting unwanted
harsh shadows... which I didn't expect (based on my... intuition...)

I think my past use of a light_group was always with a carefully-positioned
spotlight, so I probably never noticed the unexpected shadow behavior from other
scene objects. (Actually, I do recall once making a scene where I wanted a light
*underneath* the ground, to artifically light up some above-ground objects-- and
I did have to add no_shadow to the ground. But I thought that was because I had
made some kind of dumb mistake in my complex code.)


Post a reply to this message

From: clipka
Subject: Re: v3.7.1 beta 5-- light_group problem?
Date: 3 May 2017 14:40:27
Message: <590a241b$1@news.povray.org>
Am 30.04.2017 um 18:15 schrieb Alain:

> This is the correct and expected behaviour and did not change since
> light_group have been introduced.

Kenneth and Tomas' posts are clear evidence (nay, proof) that it is
/not/ "expected behaviour" - or at least not universally so.

My personal guess is that light groups were originally implemented for a
use case where shadowing objects or media were a non-issue, and thus no
thought was given in that direction whatsoever. And that when the issue
first arose, light groups were well-established already, so that the
developers were reluctant to change the implementation, out of fear of
breaking existing scenes.


Post a reply to this message

From: clipka
Subject: Re: v3.7.1 beta 5-- light_group problem?
Date: 3 May 2017 14:46:51
Message: <590a259b$1@news.povray.org>
Am 30.04.2017 um 17:04 schrieb Kenneth:

> Also, the light's looks_like object (yellow sphere) is showing lighting effects
> from the extra 'global light', even with 'global_lights off' in the light_group
> (although there's no shadow from that sphere, as far as I can tell.) I don't
> know if that is correct behavior or not.

I haven't examined the issue myself, but I wouldn't be surprised if
`looks_like` objects would always be hooked up into the global group
(again presumably because no thought had been given about the
interaction of these two features).

A workaround would be to replace the `looks_like` object with a
corresponding "regular" object in the same light group, with
`no_shadow`, `no_radiosity` and whatever other flags the `looks_like`
feature automatically sets.


Post a reply to this message

From: clipka
Subject: Re: v3.7.1 beta 5-- light_group problem?
Date: 3 May 2017 14:47:39
Message: <590a25cb$1@news.povray.org>
Am 03.05.2017 um 20:40 schrieb clipka:

> Kenneth and Tomas' posts are clear evidence (nay, proof) that it is
> /not/ "expected behaviour" - or at least not universally so.

(Sorry Tom, stole an "h" from you there...)


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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