POV-Ray : Newsgroups : povray.newusers : How do I get sharp edges with a cylinder light? : It is possible, but perfectly? Not so sure. Server Time
5 Sep 2024 00:17:37 EDT (-0400)
  It is possible, but perfectly? Not so sure.  
From: bob h
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

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