POV-Ray : Newsgroups : povray.advanced-users : Problems using light_group in POV-Ray 3.6 : Re: Problems using light_group in POV-Ray 3.6 Server Time
28 Jul 2024 18:12:14 EDT (-0400)
  Re: Problems using light_group in POV-Ray 3.6  
From: rben
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

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