POV-Ray : Newsgroups : povray.newusers : How do I get sharp edges with a cylinder light? Server Time
27 Dec 2024 02:44:51 EST (-0500)
  How do I get sharp edges with a cylinder light? (Message 1 to 5 of 5)  
From: KalleK
Subject: How do I get sharp edges with a cylinder light?
Date: 21 Apr 2002 11:01:56
Message: <3cc2d464$1@news.povray.org>
Hi all!

I tried to set falloff and radius the same but in difference to spotlight,
this doesn't make my cylinderlight sharp. What does radius and falloff mean
when used with cylinder? The help says, they have the same function as with
spotlight, but there seems to be a huge difference concerning falloff
together with radius.



By the way, I'm using 3.5 beta, there's a note in the helpsection 6.5.7.3
Cylindrical Lights that says:
"You should keep in mind that the cylindrical light source is still a point
light source. The rays are emitted from one point and are only constraint by
a cylinder. The light rays are not parallel."
Maybe it could be added that one can in fact make them parallel by using the
keywort parallel.

Thank you in advance

cukk


Post a reply to this message

From: bob h
Subject: Re: How do I get sharp edges with a cylinder light?
Date: 23 Apr 2002 05:55:12
Message: <3cc52f80$1@news.povray.org>
"KalleK" <kal### [at] gmxde> wrote in message news:3cc2d464$1@news.povray.org...
>
> I tried to set falloff and radius the same but in difference to spotlight,
> this doesn't make my cylinderlight sharp. What does radius and falloff
mean
> when used with cylinder? The help says, they have the same function as
with
> spotlight, but there seems to be a huge difference concerning falloff
> together with radius.

tightness 1, or a very small number. I've used less than 1 even though the
Doc says 1 to 100. Remember that tightness 100 concentrates toward the
radius fading the falloff, tightness 1 concentrates toward falloff diameter.
For cylinder lights this is a bit less straightforward to me, and others too
apparently, since the values for radius and falloff don't result in the same
area of projection. I can't recall what, if any, explanation is for the
differences except maybe it has to do with the cone angle versus cylinder
being a diameter. 0 to 1 (something) perhaps, instead of 0 to 360 degrees?
But I'm conjecturing. I notice it isn't stated in the Doc.

> By the way, I'm using 3.5 beta, there's a note in the helpsection 6.5.7.3
> Cylindrical Lights that says:
> "You should keep in mind that the cylindrical light source is still a
point
> light source. The rays are emitted from one point and are only constraint
by
> a cylinder. The light rays are not parallel."
> Maybe it could be added that one can in fact make them parallel by using
the
> keywort parallel.

I thought it was said someplace... maybe just inferred there where you
mention it since the following section is about parallel lights. Either that
or I could be thinking of someone commenting it into a scene file, example
with 3.5 or elsewhere.
Anyhow that still only affects the shadows, I think, and not the actual
light radius.

bob h


Post a reply to this message

From: KalleK
Subject: Re: How do I get sharp edges with a cylinder light?
Date: 27 Apr 2002 15:33:42
Message: <3ccafd16@news.povray.org>
Hi Bob!

Thanks for you answer!

> tightness 1, or a very small number. I've used less than 1 even
> though the Doc says 1 to 100. Remember that tightness 100
> concentrates toward the radius fading the falloff, tightness 1
> concentrates toward falloff diameter. For cylinder lights this is a
> bit less straightforward to me, and others too apparently, since the
> values for radius and falloff don't result in the same area of
> projection.
Do you mean that the angle (or whatever with cylinder) shouldn't be the same
for falloff and radius - in difference to the spotlight-case?
Well, at least it seams that way...

> I can't recall what, if any, explanation is for the
> differences except maybe it has to do with the cone angle versus
> cylinder being a diameter. 0 to 1 (something) perhaps, instead of 0
> to 360 degrees? But I'm conjecturing. I notice it isn't stated in the
> Doc.
I tried with very tiny values for tightness - but no sharp corners...

Here is a short scenefile that shows my problem:
the right side is what I wanted, the left side is how far I came wihth
cylinder... :-(

///begin
plane {y,0 texture{ pigment{ checker color rgb 1 color rgb .8 scale 5}}}
light_source {<0,100,0>color rgb .1}

light_source {
  <-50,50,0>
  color rgb 1
///  spotlight
  cylinder
  point_at <-5,0,0>
  falloff 5
  radius 5
  tightness .000000000000000001
}

light_source {
  <5,50,0>
  color rgb 1
  spotlight
///  cylinder
  point_at <5,0,0>
  falloff 5
  radius 5
///  tightness .0000000000001
  tightness 100
}

camera {
  location <-0,15,-1>
  look_at <-0,0,0>
}
///end

I will have a look in the Povray source, one day, to understand this strange
(at least for me) behaviour...

I hope, you don't mind this short piece of code.

cukk


Post a reply to this message

From: bob h
Subject: It is possible, but perfectly? Not so sure.
Date: 29 Apr 2002 02:15:05
Message: <3ccce4e9$1@news.povray.org>
I know I've had plenty of trouble getting what I expected too.
Bad timing at the moment since I am only now seeing this message of yours
and I went to try POV but it expired and so I went to DL the RC3 and it is
still RC2 instead. Set my clock back and day and I'm okay :-)
All right now. Hmmm. Try a tightness -1.1 and look at what happens, if you
haven't already tried negatives. I must be wrong, partly anyhow, about the
radius and falloff being very different from spotlight's. But that negative
tightness still doesn't create the exact same diameter light so it couldn't
be precisely the same either. Anyway... you'll notice that when you use a
lower number than -1.05, i.e. -1.5, that the light actually brightens. It
also has a dimmer center so that's interesting, and the outer edge doesn't
go sharp while remaining of the correct brightness. No answer, I know. Don't
bother trying falloff -5, just disappears.

Oh joy! Success at last. Try your scene file as changed below:

///begin
plane {y,0 texture{ pigment{ checker color rgb 1 color rgb .8 scale 5}}}
light_source {<0,100,0>color rgb .1}

light_source {
  <-5,50,0>
  color rgb 1
  cylinder
 // parallel
  point_at <-5,0,0>
  falloff 4.5 // ok, so not 1 to 1 relation...? With spotlight either.
  radius 12 // stranger still but keeps sharp edge if larger than falloff
  tightness 0 // why zero? no idea...
}

light_source {
  <5,50,0>
  color rgb 1
  spotlight
  point_at <5,0,0>
  falloff 5
  radius 5
  tightness 100
}

camera {
  location <-0,15,-1>
  look_at <-0,0,0>
}
///end

I realized when changing the falloff without considering radius that it
could overrun the radius. This seems about what I was finding out before but
had long since forgotten. What's more, if you use the same numbers for
spotlight it's rather different, until you use falloff 5 and radius 12 and
tightness 100. Why the 4.5 in cylinder light versus 5 in spotlight? Odd
huh...? As well as that tightness opposites, 0 not 100. This sure proves one
thing to me, the Doc is inadequate in explaining a cylinder light source as
compared to spotlight, as you have noted.

Now to reset my clock ahead to today again...

bob h


Post a reply to this message

From: KalleK
Subject: Re: It is possible, but perfectly? Not so sure.
Date: 29 Apr 2002 13:55:26
Message: <3ccd890e$1@news.povray.org>
Hi bob!

> Oh joy! Success at last. Try your scene file as changed below:

> ///begin
<*snip*>
> ///end

Thank you! That does the trick.
(now, to go on coding myscene)
A bit strange, but it works at last :-)
(as said before - maybe I will have a look into the source someday...)

> I realized when changing the falloff without considering radius that it
> could overrun the radius. This seems about what I was finding out before
but
> had long since forgotten. What's more, if you use the same numbers for
> spotlight it's rather different, until you use falloff 5 and radius 12 and
> tightness 100. Why the 4.5 in cylinder light versus 5 in spotlight? Odd
> huh...?
Well, that is a perspective thing. If you move the spotlight farther away,
the spot will enlarge. With spotlight, radius is in fact the angle and you
get a cone of light... I just tried by try and error to get the enlighted
circles somewhat the same size.

> As well as that tightness opposites, 0 not 100. This sure proves one
> thing to me, the Doc is inadequate in explaining a cylinder light source as
> compared to spotlight, as you have noted.
Yes.

> Now to reset my clock ahead to today again...
(me too... :-)

cukk


Post a reply to this message

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