POV-Ray : Newsgroups : povray.advanced-users : Problems using light_group in POV-Ray 3.6 Server Time
31 Oct 2024 21:26:04 EDT (-0400)
  Problems using light_group in POV-Ray 3.6 (Message 1 to 7 of 7)  
From: rben
Subject: Problems using light_group in POV-Ray 3.6
Date: 28 Aug 2004 21:55:00
Message: <web.41313731973db5f8497bbfc0@news.povray.org>
I apparently don't understand how to use light_groups in POV-Ray and I'm
hoping someone will help me understand them better.  I've constructed a
scene in which I want two parts lit by completely seperate groups of
lights.  It's important for the illusion I'm trying to create.  I've placed
one set of lights and objects into one light_group, and the other into a
seperate light_group, kind of like below:

light_group {
  // one or more light sources
  light_source { ... }

  // objects

  object { ... }
   .
   .
   .
  object { ... }
}

light_group {
  light_source { ... }
  object { ... }
   .
   .
   .
  object { ... }
}

I have not used the global_light keyword in either light group and I have no
global light sources.  Nevertheless, both sets of objects are being lit by
both sets of lights.  It's very frustrating.  Does anyone know if there is
a bug in the light_groups and if so how I can work around it?

Thanks,
  Ray


Post a reply to this message

From: Hughes, B 
Subject: Re: Problems using light_group in POV-Ray 3.6
Date: 28 Aug 2004 22:47:44
Message: <413143d0$1@news.povray.org>
"rben" <ray### [at] comcastnet> wrote in message 
news:web.41313731973db5f8497bbfc0@news.povray.org...
> scene in which I want two parts lit by completely seperate groups of
> lights.
> I have not used the global_light keyword in either light group and I have
> no global light sources.  Nevertheless, both sets of objects are being lit
> by both sets of lights.

Checked on it using 3.6.1.icl8.win32. Seems okay, each light only lit the 
object within its own group.


Post a reply to this message

From: rben
Subject: Re: Problems using light_group in POV-Ray 3.6
Date: 30 Aug 2004 10:35:00
Message: <web.41333a50e8f62910497bbfc0@news.povray.org>
"Hughes, B." <bob### [at] charternet> wrote:
> "rben" <ray### [at] comcastnet> wrote in message
> news:web.41313731973db5f8497bbfc0@news.povray.org...
> > scene in which I want two parts lit by completely seperate groups of
> > lights.
> > I have not used the global_light keyword in either light group and I have
> > no global light sources.  Nevertheless, both sets of objects are being lit
> > by both sets of lights.
>
> Checked on it using 3.6.1.icl8.win32. Seems okay, each light only lit the
> object within its own group.

It's possible that it's subtle.  My scene is very complex and involves over
100,000 tokens and multiple light sources.  I'll try to see if I can
recreate the problem with a simpler model.


Post a reply to this message

From: rben
Subject: Re: Problems using light_group in POV-Ray 3.6
Date: 30 Aug 2004 12:00:00
Message: <web.41334ed7e8f62910497bbfc0@news.povray.org>
"Hughes, B." <bob### [at] charternet> wrote:
> "rben" <ray### [at] comcastnet> wrote in message
> news:web.41313731973db5f8497bbfc0@news.povray.org...
> > scene in which I want two parts lit by completely seperate groups of
> > lights.
> > I have not used the global_light keyword in either light group and I have
> > no global light sources.  Nevertheless, both sets of objects are being lit
> > by both sets of lights.
>
> Checked on it using 3.6.1.icl8.win32. Seems okay, each light only lit the
> object within its own group.

Try the following code:

#version 3.5;

#include "colors.inc"

global_settings {
  assumed_gamma 1.0
  ambient_light .3
}

// ----------------------------------------

camera {
  location  <0.0, 0.5, -4.0>
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.0, 0.0,  0.0>
}

sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}

//light_source {  <0, 0, 0> color White   translate <-30, 30, -30> }

// ----------------------------------------


light_group {
  light_source {  <-100, 100, -100>  color Red   }
  //light_source { <-5,3,-10> color Green }

  sphere { <0, 0, 0>,0.5
    pigment { color White }
    translate <-1,0,1>
  }

plane { y, -1 pigment { White } } // this plane gets shadows from both
spheres!
box {0, <1,1,5>  rotate -30*y pigment {White} translate <1.5,-1,.5>} // same
with this box
  //global_lights

}



light_group {
  light_source { <100, 100, 100> color rgb Yellow }
  sphere { <0, -1, .5>,0.5  pigment { color White } }
  //global_lights

}


Post a reply to this message

From: Hughes, B 
Subject: Re: Problems using light_group in POV-Ray 3.6
Date: 30 Aug 2004 14:03:45
Message: <41336c01$1@news.povray.org>
Ah yes... shadows... I couldn't say with absolute certainty if shadows are a 
separate matter from light appearing *on* grouped objects. I see your point 
now, though. I checked the help and I thought it might specify something 
about shadows.

I can't remember any other way it might have worked. Anyone know if this was 
any different in earlier releases?

Bob H.


Post a reply to this message

From: Slime
Subject: Re: Problems using light_group in POV-Ray 3.6
Date: 30 Aug 2004 14:54:44
Message: <413377f4@news.povray.org>
> Ah yes... shadows... I couldn't say with absolute certainty if shadows are
a
> separate matter from light appearing *on* grouped objects. I see your
point
> now, though. I checked the help and I thought it might specify something
> about shadows.


All objects cast shadows for all light sources, regardless of whether they
accept the light from the light source.

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


Post a reply to this message

From: rben
Subject: Re: Problems using light_group in POV-Ray 3.6
Date: 30 Aug 2004 18:05:00
Message: <web.4133a46ce8f62910497bbfc0@news.povray.org>
"Slime" <fak### [at] emailaddress> wrote:
> > Ah yes... shadows... I couldn't say with absolute certainty if shadows are
> a
> > separate matter from light appearing *on* grouped objects. I see your
> point
> > now, though. I checked the help and I thought it might specify something
> > about shadows.
>
>
> All objects cast shadows for all light sources, regardless of whether they
> accept the light from the light source.
>
>  - Slime
>  [ http://www.slimeland.com/ ]

ouch!  Well, now I'll have to rethink how to do this scene I'm working on.
In order to get the effect I want there shouldn't be shadows from all the
light sources.  Guess I'll just have to live with it.  Thanks for answering
my question, I appreciate you taking the time.

Ray


Post a reply to this message

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