POV-Ray : Newsgroups : povray.general : Re: Possible Bugs using Light Groups in POV-Ray 3.6 Server Time
6 Nov 2024 02:24:14 EST (-0500)
  Re: Possible Bugs using Light Groups in POV-Ray 3.6 (Message 1 to 1 of 1)  
From: rben
Subject: Re: Possible Bugs using Light Groups in POV-Ray 3.6
Date: 29 Sep 2004 17:30:00
Message: <web.415b2731b7994e59497bbfc0@news.povray.org>
Then I guess it's never going to get fixed.  It seems likely to me that the
problem is in the light group stuff and the code I've supplied is the code
that demonstrates that problem.  I frankly don't know if there is a simpler
case that will demonstrate the problem and at the moment I don't have time
to chase it down.  I'm trying hard to finish my POVCOMP entry.

It is a bit presumptuous to make the statement that I'm doing something
wrong.  While that is certainly possible, if you are wrong and I have found
a problem, then your presumption just prolongs the process of fixing the
bug.
It's quite possible that there is a bug in the POV-Ray code or that the
code behaves in a non-intuitive way that needs to be better explained.
(I recently learned that objects in seperate light groups block the light
from light sources in other light groups.  The shadows they cast are not
expected if you assume, as I did, that light groups completely seperate the
interaction of light and objects between different light groups.  That may
not be a bug, but it isn't intuitive.)

In my post I actually referred to two problems.  It seems you missed the
other problem completely. The second problem, where light sources are not
emitting light when used in compound objects in a light group, is trivially
easy to test.  Here is the code to demonstrate that problem:

#version 3.5;

#include "colors.inc"
#include "finish.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>]
    }
  }
}

#declare m = 1;
#declare cm = m/100;
#declare km = 1000*m;
#declare mm = cm/10;

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

// ----------------------------------------
#local SL_R = 30*cm;
#local SL_L = 50*cm;
#local SL_T = 2*cm;

#local SL_Bulb_Offset = 20*cm;

#declare SearchLight = union {
  union {
    light_source {
      SL_Bulb_Offset*x                     // light's position (translated
below)
      color rgb <1,1,1> / 3      // light's color
      spotlight               // this kind of light source
      point_at <SL_Bulb_Offset*2, 0, 0>      // direction of spotlight
      radius 30
      tightness 0
      falloff 35
      looks_like {
        sphere {SL_Bulb_Offset*x, SL_R/2
          hollow
          no_shadow
          texture {
            pigment {White}
            finish {Luminous}
          } // texture
        }
      }
    }
    // Body of Search Light
    difference {
      cylinder {-20*cm*x, SL_L*x, SL_R}
      cylinder {0, SL_L*x, (SL_R - SL_T) translate SL_T*x pigment {White}}
      pigment {Gray50}
    }
    translate SL_R*y
  }
}


///////////// Light Groups /////////////////////////////////////////////
//light_group {
   light_source {  <-100, 100, -100>  color White   }

  object {SearchLight rotate -90*z}


plane { y, -1 pigment { White } } // this plane gets shadows from both
spheres!

//}

Just run it, then uncomment the light group to see the problem demonstrated.

I've already worked around these problems for the image that I'm working on.
 I'm not reporting these issues for my own benefit, but so that if there is
a problem in the code it can be fixed so that everyone who uses this
excellent tool benefits.  Light groups are a very impressive and
potentially very useful feature, but only if they behave consistently.

The rest is up to you.


Post a reply to this message

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