POV-Ray : Newsgroups : povray.newusers : Black ends of cylindrical lights Server Time
29 Jul 2024 18:19:55 EDT (-0400)
  Black ends of cylindrical lights (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: Ard
Subject: Black ends of cylindrical lights
Date: 24 Jun 2005 01:00:01
Message: <web.42bb922761ccf3a2ed802ab30@news.povray.org>
I'm trying to render stage lighting using cylindrical light sources and
environmental media.  Spotlights above a stage in a smoky bar, kind of
thing.

The light sources are in the image, surrounded by objects that make them
look like conventional spotlights, and the beams being emitted look
fantastic as do the objects (musicians) they illuminate.  However the light
sources look awful.

Here is a very simple example that exaggerates the problem.  The ends of the
cylindrical lights are rendered as stark black discs.

camera {
  location <0, 0.5, -1> look_at y/3
}
plane {-z, -1 pigment {rgb 1}}   // Backdrop
plane { y,  0 pigment {rgb 1}}   // Floor
// 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 {
  <-0.5, 0.4, 0>
  color rgb <0, 0, 5>
  cylinder
  parallel
  radius 0.05
  falloff 0.10
  point_at <0.3, 0, -0.1>
}
// Red light aimed nearly at the camera
light_source {
  <0.1, 0.6, 0.5>
  color rgb <5, 0, 0>
  cylinder
  radius 0.03
  falloff 0.07
  point_at <-0.05, 0.35, -1>
}
media { scattering { 2, rgb 1/2 extinction 0} }

I've various ways to replace the disks with illuminating objects, but they
all look awful and I get the feeling I'm just missing something obvious.

Please set me right.  Is there a simple way to remove those black discs?

Many, many thanks in advance.


Post a reply to this message

From: JYR
Subject: Re: Black ends of cylindrical lights
Date: 24 Jun 2005 05:35:01
Message: <web.42bbd2cbbd7481d36a3607400@news.povray.org>
"Ard" <ard### [at] waikatoacnz> wrote:
> The ends of the cylindrical lights are rendered as stark black discs.
> [snip]
> media { scattering { 2, rgb 1/2 extinction 0} }

see thread:
web.42b69f52a6ab8cf34f17dd8d0%40news.povray.org
Basically, your media has no container and Pov attempts to sample the media
along an infinite ray.

JYR


Post a reply to this message

From: JYR
Subject: Re: Black ends of cylindrical lights
Date: 24 Jun 2005 05:55:00
Message: <web.42bbd7e0bd7481d36a3607400@news.povray.org>
"JYR" <jyr### [at] hotmailcom> wrote:
> web.42b69f52a6ab8cf34f17dd8d0%40news.povray.org
oops, make that:
web.42b69f52a6ab8cf34f17dd8d0@news.povray.org

JYR


Post a reply to this message

From: Ard
Subject: Re: Black ends of cylindrical lights
Date: 24 Jun 2005 08:00:00
Message: <web.42bbf552bd7481d397d402360@news.povray.org>
> web.42b69f52a6ab8cf34f17dd8d0@news.povray.org

Thanks for that.  However I'm not sure that my problem is the same as
Burki's, or at least the solution isn't the same.  He had artefacts in
conical spotlights; I'm getting them at the origin of cylindrical
spotlights, the beams of which travel only a couple of units before
striking an object.  It looks like the light is emanating from a black
saucer.

I have limited the media thus:

box {-2 2
  hollow pigment{rgbt 1}
  interior {media { scattering { 2, rgb 1/2 extinction 0} samples 50}}
}

....with no improvement.

Thanks for your help so far.  I wonder if I could trouble you for some more
:-)


Post a reply to this message

From: Brian Elliott
Subject: Re: Black ends of cylindrical lights
Date: 24 Jun 2005 10:18:43
Message: <42bc1643$1@news.povray.org>
"Ard" <ard### [at] waikatoacnz> wrote in message 
news:web.42bbf552bd7481d397d402360@news.povray.org...
>
>> web.42b69f52a6ab8cf34f17dd8d0@news.povray.org
>
> Thanks for that.  However I'm not sure that my problem is the same as
> Burki's, or at least the solution isn't the same.  He had artefacts in
> conical spotlights; I'm getting them at the origin of cylindrical
> spotlights, the beams of which travel only a couple of units before
> striking an object.  It looks like the light is emanating from a black
> saucer.
>
> I have limited the media thus:
>
> box {-2 2
>  hollow pigment{rgbt 1}
>  interior {media { scattering { 2, rgb 1/2 extinction 0} samples 50}}
> }
>
> ....with no improvement.
>
> Thanks for your help so far.  I wonder if I could trouble you for some 
> more
> :-)

Hello,

After futzing around with it here, unfortunately I haven't come to a 
solution either.  I have found however that it does appear to be a 
media-related problem, but as you say, is not the same as Burki's.

I think I must have done much the same experiement with media as you --  
encase the scene and media inside a hollow object to eliminate infinite rays 
as a cause.  Bumping up samples and intervals also made no difference to the 
black circles.

I added looks_like {disc {}} clauses to the light sources to give them 
visibility as physical objects.  The discs are oriented in the direction of 
the beams, representing the front lens/filter of the light  (see code 
below).

What leads me to still suspect it is media, is this:  When the interior 
{media{...}} line is commented out, the cylinder lights now properly look 
like red and blue circles, due to the discs.  They were invisible before. 
Woohoo, progress, etc.  That multiplier of 0.001 I put on on the disc 
location in the pointing direction, is merely to avoid coincident surface 
speckle with the light origin, otherwise its value would have been <0,0,0>.

BUT when the interior {media{...}} line is re-enabled, the lights become 
black holes again.  It seems as though media is not calculated at all for 
rays traced from the camera that hit a light source object(?)  But I'm not 
sure if that really explains why the discs (which are very slightly in front 
of the light origins) also disappear when media is active.  Look closely, 
and you'll see that the part of the disc which is WIDER than the radius of 
the light, is still visible around the black part.

I've pushed your "furniture" around a bit - everything is not where you last 
left it!   :-)
Sorry I haven't been more help than just finding out "more" about the 
problem!

Cheers,
  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 50 }}
}

#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>
  cylinder
  parallel
  radius 0.05
  falloff 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>
  cylinder
  radius 0.03
  falloff 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}
    }
  }

}


Post a reply to this message

From: Alain
Subject: Re: Black ends of cylindrical lights
Date: 24 Jun 2005 10:30:24
Message: <42bc1900$1@news.povray.org>
Ard nous apporta ses lumieres en ce 2005-06-24 00:55:
> I'm trying to render stage lighting using cylindrical light sources and
> environmental media.  Spotlights above a stage in a smoky bar, kind of
> thing.
> 
> The light sources are in the image, surrounded by objects that make them
> look like conventional spotlights, and the beams being emitted look
> fantastic as do the objects (musicians) they illuminate.  However the light
> sources look awful.
> 
> Here is a very simple example that exaggerates the problem.  The ends of the
> cylindrical lights are rendered as stark black discs.
> 
> camera {
>   location <0, 0.5, -1> look_at y/3
> }
> plane {-z, -1 pigment {rgb 1}}   // Backdrop
> plane { y,  0 pigment {rgb 1}}   // Floor
> // 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 {
>   <-0.5, 0.4, 0>
>   color rgb <0, 0, 5>
>   cylinder
>   parallel
>   radius 0.05
>   falloff 0.10
>   point_at <0.3, 0, -0.1>
> }
> // Red light aimed nearly at the camera
> light_source {
>   <0.1, 0.6, 0.5>
>   color rgb <5, 0, 0>
>   cylinder
>   radius 0.03
>   falloff 0.07
>   point_at <-0.05, 0.35, -1>
> }
> media { scattering { 2, rgb 1/2 extinction 0} }
> 
> I've various ways to replace the disks with illuminating objects, but they
> all look awful and I get the feeling I'm just missing something obvious.
> 
> Please set me right.  Is there a simple way to remove those black discs?
> 
> Many, many thanks in advance.
> 
> 
> 
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!

Alain


Post a reply to this message

From: Brian Elliott
Subject: Re: Black ends of cylindrical lights
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

From: Brian Elliott
Subject: Re: Black ends of cylindrical lights
Date: 24 Jun 2005 11:46:05
Message: <42bc2abd@news.povray.org>
"Brian Elliott" <NotForSpam@AskIfUWant> wrote in message 
news:42bc285c$1@news.povray.org...
>
> 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 ----
> [snip]

What I should have said:  In that scene, the green box is "burnt right 
through" by the cylindrical light behind it when the "interior {media}" line 
is used, but is correct with media commented out.


Post a reply to this message

From: Ard
Subject: Re: Black ends of cylindrical lights
Date: 24 Jun 2005 20:15:00
Message: <web.42bca198bd7481d39a0bf9720@news.povray.org>
> That is such a strange behaviour -- and a scene-breaker.  I've never used
[...]
> Is it known if this issue is tested for in the Pov-Ray 3.7 beta?
[...]
> What I should have said:  In that scene, the green box is "burnt right
> through" by the cylindrical light behind it when the "interior {media}" line
> is used, but is correct with media commented out.

In the more complicated scene that first displayed this behaviour, one
object *was* mapped on top of the black disc.  It was about 0.1u behind the
aperture, in a light_group lit by a source about 0.05u away - the
extremely-brightly lit insides of the real-world spotlight behind the
origin of the POV cylindrical light.  So some things do show through.  Not
that that makes any difference, but it's another observation to throw on
the pile.

Anyway, how can I bring this to the attention of the developers (my
apologies for not recognising you, if you are one) and make sure it is
tracked?

Thanks again.


Post a reply to this message

From: JYR
Subject: Re: Black ends of cylindrical lights
Date: 24 Jun 2005 22:15:00
Message: <web.42bcbd90bd7481d36a3607400@news.povray.org>
"Ard" <ard### [at] waikatoacnz> wrote:
> I'm not sure that my problem is the same as
> Burki's, or at least the solution isn't the same.

Oops... i apologize, my answer was definitely not relevant. Clearly not the
same issue. I see that others played with your scene today, and i can't
quite come up with a better idea... :(
I even tried to constrain the media inside the cylinder you wish to see and
locate the light_source slightly outside... to no avail. It seems that the
location of the light_source does NOT have to be IN the media for this
artifact to show up.

JYR


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

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