POV-Ray : Newsgroups : povray.general : [POV 3.5] Warning? Server Time
6 Aug 2024 12:28:06 EDT (-0400)
  [POV 3.5] Warning? (Message 1 to 5 of 5)  
From: Micha Riser
Subject: [POV 3.5] Warning?
Date: 3 Apr 2002 08:58:18
Message: <3cab0a7a@news.povray.org>
"Warning: Cylinder lights should be parallel when used with photons."

What does this mean? Are cylindrical lights & photons working or not?


-- 
objects.povworld.org - The POV-Ray Objects Collection
book.povworld.org    - The POV-Ray Book Project


Post a reply to this message

From: bob h
Subject: Re: [POV 3.5] Warning?
Date: 3 Apr 2002 12:10:51
Message: <3cab379b@news.povray.org>
"Micha Riser" <mri### [at] gmxnet> wrote in message
news:3cab0a7a@news.povray.org...
> "Warning: Cylinder lights should be parallel when used with photons."
>
> What does this mean? Are cylindrical lights & photons working or not?

I noticed that too. Doesn't appear to be anything wrong by leaving parallel
out. I was thinking it might have something to do with prior betas, as it
seems there was a time when cylindrical lights that used photons had
problems with showing up in media. I couldn't find a message posting about
it though.

bob h


Post a reply to this message

From: Slime
Subject: Re: [POV 3.5] Warning?
Date: 3 Apr 2002 12:43:33
Message: <3cab3f45@news.povray.org>
> "Warning: Cylinder lights should be parallel when used with photons."

I'm willing to bet this is because of the way cylinder lights work. When an
object is tested for illumination by a cylinder light, it checks two things:
a) it is inside the cylinder that contains the light
b) there is a clear path from it to the light source

But the light rays themselves are actually not parallel. (This can actually
create ever-so-slightly incorrect shading.)

So, this works decently when doing backwards raytracing, since you can first
see if you're inside the cylinder, and then if you are, trace a path to the
light source to see if you're illuminated. But with photons, which simulate
forward raytracing, the path is traced first. So, the photons will be shot
from the light source, and they don't know if they're leaving the cylinder
or not! So they could end up illuminating things that a cylindrical light
source would otherwise not illuminate.

On the other hand, I was under the impression that parallel light sources
affected nothing but shadow calculation, and didn't affect the starting
position and direction of photons, but maybe that's wrong.

- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]


Post a reply to this message

From: Micha Riser
Subject: Re: [POV 3.5] Cylindrical lights & photons?
Date: 3 Apr 2002 17:26:14
Message: <3cab8185@news.povray.org>
Slime wrote:

>> "Warning: Cylinder lights should be parallel when used with photons."
> 
> I'm willing to bet this is because of the way cylinder lights work. When
> an object is tested for illumination by a cylinder light, it checks two
> things: a) it is inside the cylinder that contains the light
> b) there is a clear path from it to the light source
> 
> But the light rays themselves are actually not parallel. (This can
> actually create ever-so-slightly incorrect shading.)
> 
> So, this works decently when doing backwards raytracing, since you can
> first see if you're inside the cylinder, and then if you are, trace a path
> to the light source to see if you're illuminated. But with photons, which
> simulate forward raytracing, the path is traced first. So, the photons
> will be shot from the light source, and they don't know if they're leaving
> the cylinder or not! So they could end up illuminating things that a
> cylindrical light source would otherwise not illuminate.
> 
> On the other hand, I was under the impression that parallel light sources
> affected nothing but shadow calculation, and didn't affect the starting
> position and direction of photons, but maybe that's wrong.
> 

Can anybody show a scene where cylindrical lights and photons are working 
correctly? I could not get it work as expected... 


-- 
objects.povworld.org - The POV-Ray Objects Collection
book.povworld.org    - The POV-Ray Book Project


Post a reply to this message

From: bob h
Subject: Re: [POV 3.5] Cylindrical lights & photons? testing
Date: 3 Apr 2002 19:20:17
Message: <3cab9c41@news.povray.org>
"Micha Riser" <mri### [at] gmxnet> wrote in message
news:3cab8185@news.povray.org...
>
> Can anybody show a scene where cylindrical lights and photons are working
> correctly? I could not get it work as expected...

I modified Chris Huff's optic.pov scene to check on this more and I sure
don't see a problem with parallel used or not, spotlight or cylinderlight.
I don't know if it'd be appropriate to post that file, but it's relative
easy to modify it yourself. I just added a rotated plane to show the photons
at the ends of the (reflected and refracted) light beams. I checked both
with and without media.
I put switches to change between all possiblities, i.e. spot, cylinder,
parallel or not, media or not. The cylinder light is simply the spotlight
with a keyword change.
Suggest you also lower ior to 1.1 in order to see the photons better.

Here's the additions, may make it easier to try, you should be able to see
how it goes into the scenes\advanced\optics.pov:

-- start of file (add) --
#declare Media=no;
#declare Parallel=yes;
#declare Spot=no;

-- light (edit) --
    #if (Spot=yes)
    spotlight radius 0.3 falloff 0.35 #if (Parallel=yes) parallel #end
point_at <0, 0.5, 0>
    #else
    cylinder radius 0.3 falloff 0.35 #if (Parallel=yes) parallel #end
point_at <0, 0.5, 0>
    #end

-- media (edit)--
#if (Media=yes)
    interior {
        media {
            scattering {1, color White extinction 0}
//            emission color White*0.2
            method 3
            intervals 1 samples 4
        }
    }
#end

-- ior (edit?)--
#declare GlassInt1 =
interior {ior 1.1}

-- end of file (add) --
plane {x,0
pigment {rgb 1}
finish {ambient 0 diffuse 1}
rotate -60*z translate 3*x
 // PhotonTarget(no, no, no)
hollow
}


Post a reply to this message

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