POV-Ray : Newsgroups : povray.newusers : Strangeness with Parallel Lights Server Time
26 Nov 2024 17:15:40 EST (-0500)
  Strangeness with Parallel Lights (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Phil Cook
Subject: Strangeness with Parallel Lights
Date: 10 Feb 2004 10:12:15
Message: <opr25twbswp4ukzs@news.povray.org>
I've hacked away at a much larger script to isolate the error which 
produce the code below; and still it refuses to behave.

The camera is inside a hollowed out box, there are no openings to the 
outside world. I'm pointing a set of parallel lights from outside the box 
to a point inside.

So. where's the light coming from?

Am I doing something fundementally wrong (most likely) or is this some 
property of parallel light's I don't know about showing up?

Please save my sanity and allow me to get back to my project.

--
Phil

<code>

#declare WindowGap=16;
#declare NumberOfWindows=5;

camera{
location <6,15,2>
look_at <6,15,30>
}

#declare OuterWall=
difference{
box{0,<20,20,100>}
box{0,<18,18,98>  translate <1,1,1>}
pigment{rgb <1,0,1>} finish{ambient 0.2}
hollow
}

#declare WindowCount=1;
#while(WindowCount<NumberOfWindows)
light_source{<-5,6,WindowGap*WindowCount> rgb 1 parallel point_at 
<1,0,WindowGap*WindowCount>}
#declare WindowCount=WindowCount+1;
#end

object{OuterWall}
</code>

-- 
All thoughts and comments are my own unless otherwise stated and I am 
happy to be proven wrong.


Post a reply to this message

From: Severi Salminen
Subject: Re: Strangeness with Parallel Lights
Date: 10 Feb 2004 10:59:45
Message: <4028fff1$1@news.povray.org>
Phil Cook wrote:

> The camera is inside a hollowed out box, there are no openings to the 
> outside world. I'm pointing a set of parallel lights from outside the 
> box to a point inside.
> 
> So. where's the light coming from?
> 
> Am I doing something fundementally wrong (most likely) or is this some 
> property of parallel light's I don't know about showing up?

Read this section in the manual:

6.5.7.4  Parallel Lights

Severi Salminen


Post a reply to this message

From: Hughes, B 
Subject: Re: Strangeness with Parallel Lights
Date: 10 Feb 2004 11:26:55
Message: <4029064f$1@news.povray.org>
"Severi Salminen" <sev### [at] NOT_THISsibafi> wrote in message
news:4028fff1$1@news.povray.org...
> Phil Cook wrote:
>
> > The camera is inside a hollowed out box, there are no openings to the
> > outside world. I'm pointing a set of parallel lights from outside the
> > box to a point inside.
> >
> > So. where's the light coming from?
> >
> > Am I doing something fundementally wrong (most likely) or is this some
> > property of parallel light's I don't know about showing up?
>
> Read this section in the manual:
>
> 6.5.7.4  Parallel Lights

Hopefully Phil will see that you are probably referring to the plane of
light projection. So, Phil, you'll need to watch out for that plane of light
and any intersecting with objects it might do. I realize the doc says this,
basically, but perhaps not in a way everyone will understand-- which is
pictures like Phil's.  :-)

-- 
Bob H.
http://www.3digitaleyes.com


Post a reply to this message

From: Phil Cook
Subject: Re: Strangeness with Parallel Lights
Date: 10 Feb 2004 11:52:39
Message: <opr25yj0lyp4ukzs@news.povray.org>
On Tue, 10 Feb 2004 10:26:46 -0600, Hughes, B. <omn### [at] charternet> 
wrote:

> "Severi Salminen" <sev### [at] NOT_THISsibafi> wrote in message
> news:4028fff1$1@news.povray.org...
>> Phil Cook wrote:
>>
>> > The camera is inside a hollowed out box, there are no openings to the
>> > outside world. I'm pointing a set of parallel lights from outside the
>> > box to a point inside.
>> >
>> > So. where's the light coming from?
>> >
>> > Am I doing something fundementally wrong (most likely) or is this some
>> > property of parallel light's I don't know about showing up?
>>
>> Read this section in the manual:
>>
>> 6.5.7.4  Parallel Lights
>
> Hopefully Phil will see that you are probably referring to the plane of
> light projection. So, Phil, you'll need to watch out for that plane of 
> light
> and any intersecting with objects it might do. I realize the doc says 
> this,
> basically, but perhaps not in a way everyone will understand-- which is
> pictures like Phil's.  :-)
>

You caught me in the middle of replying to Severi; so I'll start again 
here. Yep I guessed it had something to do with the light plane, but can't 
figure out how it works. I'm producing a plane presumely based at location 
perpendicular to the point_at so if my location was at 0 and point_at y 
then then it would be equivalent a plane{0,y} I assume?

I've just read what I wrote and worked it out: the plane I'm producing is 
passing through the box; as the light is taken from the closet point of 
the plane I'm getting the equivalent of an internal light source. Sheesh

Thanks for all the help

--
Phil

-- 
All thoughts and comments are my own unless otherwise stated and I am 
happy to be proven wrong.


Post a reply to this message

From: Christopher James Huff
Subject: Re: Strangeness with Parallel Lights
Date: 10 Feb 2004 12:44:00
Message: <cjameshuff-9C1A31.12442110022004@news.povray.org>
In article <opr25yj0lyp4ukzs@news.povray.org>,
 Phil Cook <phi### [at] nospamdeckingdealscouk> wrote:

> You caught me in the middle of replying to Severi; so I'll start again 
> here. Yep I guessed it had something to do with the light plane, but can't 
> figure out how it works. I'm producing a plane presumely based at location 
> perpendicular to the point_at so if my location was at 0 and point_at y 
> then then it would be equivalent a plane{0,y} I assume?

No. The point_at vector is a location, the plane vector is a direction 
(the plane normal). Thought the two are the same when the location is < 
0, 0, 0>, as in your example.


> I've just read what I wrote and worked it out: the plane I'm producing is 
> passing through the box; as the light is taken from the closet point of 
> the plane I'm getting the equivalent of an internal light source. Sheesh

Right.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Phil Cook
Subject: Re: Strangeness with Parallel Lights
Date: 11 Feb 2004 05:10:05
Message: <opr27akwh2p4ukzs@news.povray.org>
On Tue, 10 Feb 2004 12:44:21 -0500, Christopher James Huff 
<cja### [at] earthlinknet> wrote:

> In article <opr25yj0lyp4ukzs@news.povray.org>,
>  Phil Cook <phi### [at] nospamdeckingdealscouk> wrote:
>
>> You caught me in the middle of replying to Severi; so I'll start again
>> here. Yep I guessed it had something to do with the light plane, but 
>> can't
>> figure out how it works. I'm producing a plane presumely based at 
>> location
>> perpendicular to the point_at so if my location was at 0 and point_at y
>> then then it would be equivalent a plane{0,y} I assume?
>
> No. The point_at vector is a location, the plane vector is a direction
> (the plane normal). Thought the two are the same when the location is <
> 0, 0, 0>, as in your example.

Errr. If light-source{0 rgb 1 parallel point_at y} then surely if I 
connect a line between location and point_at than a plane perpendicular to 
this would be lying at 0 in the XZ plane ie. plane {0,y} and not 
plane{y,y} or even plane{y,-y}; in the same way that light_source{y rgb 1 
parallel point_at <1,1,0>} would produce the equivalent of a plane{0,x} or 
plane{y,x} to be more precise: otherwise the scene I've just produced 
wouldn't work; unless I'm just lucky :)

>> I've just read what I wrote and worked it out: the plane I'm producing 
>> is
>> passing through the box; as the light is taken from the closet point of
>> the plane I'm getting the equivalent of an internal light source. Sheesh
>
> Right.

So I moved the light location to: 
light_source{<-5,20,WindowGap*WindowCount> rgb 1 parallel point_at 
<10,0,WindowGap*WindowCount>} which produces just the right results. Now 
I've figured it out I assume that I don't need to reproduce the lights at 
multiple points as the light plane will cover the entire scene. Though 
just doing a quick render I prefer the extra amount of light; I'll just 
hike the rgb up. Hmm much faster.

--
Phil

-- 
All thoughts and comments are my own unless otherwise stated and I am 
happy to be proven wrong.


Post a reply to this message

From: Christopher James Huff
Subject: Re: Strangeness with Parallel Lights
Date: 11 Feb 2004 08:05:59
Message: <cjameshuff-67786F.08062211022004@news.povray.org>
In article <opr27akwh2p4ukzs@news.povray.org>,
 Phil Cook <phi### [at] nospamdeckingdealscouk> wrote:

> > No. The point_at vector is a location, the plane vector is a direction
> > (the plane normal). Thought the two are the same when the location is <
> > 0, 0, 0>, as in your example.
> 
> Errr. If light-source{0 rgb 1 parallel point_at y} then surely if I 
> connect a line between location and point_at than a plane perpendicular to 
> this would be lying at 0 in the XZ plane ie.

Right. The surface normal direction and the point_at location match up, 
because the light location is < 0, 0, 0>. You could use a non-normalized 
vector as well, it doesn't matter as long as they point in the same 
direction.


> plane {0,y} and not plane{y,y} or even plane{y,-y};

Er, no. It would be "plane {y, 0}". The last two aren't even valid 
planes...the POV primitive takes a normal vector and displacement 
distance.


> in the same way that light_source{y rgb 1 
> parallel point_at <1,1,0>} would produce the equivalent of a plane{0,x} or 
> plane{y,x} to be more precise: otherwise the scene I've just produced 
> wouldn't work; unless I'm just lucky :)

A location of < 0, 1, 0> (y) and point_at of < 1, 1, 0> would lead to a 
direction of < 1, 0, 0>, or x. The equivalent plane would be "plane {x, 
0}". Again, "plane {y, x}" isn't even a valid plane.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Hughes, B 
Subject: Re: Strangeness with Parallel Lights
Date: 11 Feb 2004 09:18:52
Message: <402a39cc$1@news.povray.org>
You guys are starting to confuse me... Only joking.

I had forgotten how parallel lights treat fading so I gave it a look in a
few renders by building on Phil's example scene (see image). Maybe this will
help a few people understand parallel lights a little better.

http://www.3digitaleyes.com/parallel_light.jpg

Maybe this picture is worth a thousand words-- or at least a paragraph.  :-)

I know the documention tells how fading (attenuation) is same as for
ordinary point lights but I wanted to be sure if that meant for all
directions and not just the point_at one. I probably knew already but
couldn't remember. The blue cones are where the light sources are and where
they point. Inside the box is a yellow cone to show that 'parallel'
direction and shadow; no shadow in opposite direction, as per the
documentation (unidirectional).

Bob H.


Post a reply to this message

From: Phil Cook
Subject: Re: Strangeness with Parallel Lights
Date: 11 Feb 2004 11:26:50
Message: <opr27r0zp4p4ukzs@news.povray.org>
On Wed, 11 Feb 2004 08:06:22 -0500, Christopher James Huff 
<cja### [at] earthlinknet> wrote:

> In article <opr27akwh2p4ukzs@news.povray.org>,
>  Phil Cook <phi### [at] nospamdeckingdealscouk> wrote:
>
>> > No. The point_at vector is a location, the plane vector is a direction
>> > (the plane normal). Thought the two are the same when the location is 
>> <
>> > 0, 0, 0>, as in your example.
>>
>> Errr. If light-source{0 rgb 1 parallel point_at y} then surely if I
>> connect a line between location and point_at than a plane perpendicular 
>> to
>> this would be lying at 0 in the XZ plane ie.
>
> Right. The surface normal direction and the point_at location match up,
> because the light location is < 0, 0, 0>. You could use a non-normalized
> vector as well, it doesn't matter as long as they point in the same
> direction.
>
>
>> plane {0,y} and not plane{y,y} or even plane{y,-y};
>
> Er, no. It would be "plane {y, 0}". The last two aren't even valid
> planes...the POV primitive takes a normal vector and displacement
> distance.
>
>
>> in the same way that light_source{y rgb 1
>> parallel point_at <1,1,0>} would produce the equivalent of a plane{0,x} 
>> or
>> plane{y,x} to be more precise: otherwise the scene I've just produced
>> wouldn't work; unless I'm just lucky :)
>
> A location of < 0, 1, 0> (y) and point_at of < 1, 1, 0> would lead to a
> direction of < 1, 0, 0>, or x. The equivalent plane would be "plane {x,
> 0}". Again, "plane {y, x}" isn't even a valid plane.
>

Sorry my bad I don't use planes that often and was confusing my terms; 
again sorry, of course plane{y,y} should have been plane{y,1} etc. Odd 
that when I code I don't tend to get it wrong but do when I try to post it 
in a newsgroup for the whole world to see :)

--
Phil


-- 
All thoughts and comments are my own unless otherwise stated and I am 
happy to be proven wrong.


Post a reply to this message

From: Phil Cook
Subject: Re: Strangeness with Parallel Lights
Date: 11 Feb 2004 11:47:06
Message: <opr27syqj0p4ukzs@news.povray.org>
On Wed, 11 Feb 2004 08:18:51 -0600, Hughes, B. <omn### [at] charternet> 
wrote:

> You guys are starting to confuse me... Only joking.
>
> I had forgotten how parallel lights treat fading so I gave it a look in a
> few renders by building on Phil's example scene (see image). Maybe this 
> will
> help a few people understand parallel lights a little better.
>
> http://www.3digitaleyes.com/parallel_light.jpg
>
> Maybe this picture is worth a thousand words-- or at least a paragraph.  
> :-)
>
> I know the documention tells how fading (attenuation) is same as for
> ordinary point lights but I wanted to be sure if that meant for all
> directions and not just the point_at one. I probably knew already but
> couldn't remember. The blue cones are where the light sources are and 
> where
> they point. Inside the box is a yellow cone to show that 'parallel'
> direction and shadow; no shadow in opposite direction, as per the
> documentation (unidirectional).

Thanks that's interesting, and I'm sure will come in useful for some 
interesting lighting techniques. Out of curiosity as parallel can be used 
with any light_source do you know the effects of combining it with area 
lights I'm imagining an area light in the XY plane with a 45 degree 
point_at would a plane be created for each light?

--
Phil

-- 
All thoughts and comments are my own unless otherwise stated and I am 
happy to be proven wrong.


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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