POV-Ray : Newsgroups : povray.newusers : Black ends of cylindrical lights : Re: Black ends of cylindrical lights Server Time
29 Jul 2024 16:19:01 EDT (-0400)
  Re: Black ends of cylindrical lights  
From: Brian Elliott
Date: 24 Jun 2005 11:35:56
Message: <42bc285c$1@news.povray.org>
"Alain" <ele### [at] netscapenet> wrote in message 
news:42bc1900$1@news.povray.org...
> Ard nous apporta ses lumieres en ce 2005-06-24 00:55:
> A few solutions that I think of:
>  - use spotlight instead of cylinder. You get conical beams, no black 
> disks. Increase the radius and falloff angles: 0.05 become 5
>  - As you already have spotlight objects, just put a regular light_source 
> _inside_  those objects. Don't use look_like. Make sure that the front end 
> is actualy open. An advantage is that you can have working bafles just 
> like on real spotlights, enabeling you to have a shaped beam, not just a 
> circular one. If you want fuzzy edges, use an area_light with circular and 
> orient (try 17*17 aray for smooth results) and keep the vectors short. Add 
> adaptive 0 and increase if you get artefacts (light spot in shadow or dark 
> spot in lighted area)
> You can combine those 2 suggestions: area_light spotlight.
> If you get artefacts IN the beams, increase the samples value, DON'T 
> increase intervals!

That is such a strange behaviour -- and a scene-breaker.  I've never used 
cylindrical lights before, let alone use them in media and placed within the 
viewport, and would never have expected this.

I've just experimented a bit more placing objects in Ard's scene.  No colour 
is calculated for pixels which map over the aperture of a cylindrical light 
when media is on.  Even when a nearer opaque object obscures the light 
source from view, that part of it still becomes black, and ONLY when media 
is on.

Is it known if this issue is tested for in the Pov-Ray 3.7 beta?

Brian

---- code ----
camera {
//  location <0, 0.5, -1> look_at y/3
  location <0, 0.5, -2> look_at y/3

}
plane {-z, -1 pigment {rgb 1}}   // Backdrop
plane { y,  0 pigment {rgb 1}}   // Floor
sphere
{ 0, 10 hollow
  interior {media { scattering { 2, rgb 1/2 extinction 0} intervals 1 
samples 20 }}
}

#declare Light_Location_Red  = <0.1, 0.6, 0.5>;
#declare Light_PointAt_Red   = <-0.05, 0.15, -0.75>; // <-0.05, 0.35, -1>;
#declare Light_Direction_Red = vnormalize (Light_PointAt_Red - 
Light_Location_Red);

#declare Light_Location_Blue  = <-0.5, 0.4, 0>;
#declare Light_PointAt_Blue   = <0.3, 0, -0.1>;
#declare Light_Direction_Blue = vnormalize (Light_PointAt_Blue - 
Light_Location_Blue);


// Illuminate the background so that the black discs at the ends
// off the cylindrical lights are more obvious
light_source {<10, 10 -10> rgb 0.3}
// Blue light on left, aimed right, striking the floor:
light_source {
  Light_Location_Blue
  color rgb <0, 0, 5>
  spotlight //cylinder
  parallel
  radius 5   // 0.05
  falloff 10 // 0.10
  point_at Light_PointAt_Blue
/*  looks_like
  { disc
    { Light_Direction_Blue*0.001, Light_Direction_Blue, 0.11
      pigment {rgb 1} double_illuminate // finish {ambient 1}
    }
  } */
}

// Red light aimed nearly at the camera
light_source {
  Light_Location_Red
  color rgb <5, 0, 0>
  /*spotlight*/ cylinder
  radius  0.03 // 0.03
  falloff 0.07 //0.07
  point_at Light_PointAt_Red
  looks_like
  { disc
    { Light_Direction_Red*0.001, Light_Direction_Red, 0.11
      pigment {rgb 1} double_illuminate //finish {ambient 1}
    }
  }
}


disc
{ Light_Location_Blue+Light_Direction_Blue*0.2, Light_Direction_Blue, 0.11
  pigment {rgb 1} double_illuminate no_shadow // finish {ambient 1}
}

/*
disc
{ Light_Location_Red+Light_Direction_Red*0.1, Light_Direction_Red, 0.11
  pigment {rgb 1}  double_illuminate no_shadow //finish {ambient 1}
}
*/

box
{ Light_Location_Red + Light_Direction_Red*0.3 - 0.1,
  Light_Location_Red + Light_Direction_Red*0.3 + 0.1
  texture
  { pigment {rgb <0.3, 1, 0.3>}
    finish  {ambient 0.2}
  }
}


Post a reply to this message

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