POV-Ray : Newsgroups : povray.documentation.inbuilt : looks_like suggestion Server Time
28 Jan 2022 10:41:20 EST (-0500)
  looks_like suggestion (Message 16 to 25 of 25)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Mike Horvath
Subject: Re: looks_like suggestion
Date: 14 Sep 2016 21:32:58
Message: <57d9fa4a$1@news.povray.org>
On 9/12/2016 10:43 AM, Mike Horvath wrote:
> On 9/12/2016 7:56 AM, clipka wrote:
>> Am 12.09.2016 um 12:45 schrieb Jim Holsenback:
>>> On 9/11/2016 1:55 PM, clipka wrote:
>>>> Am 11.09.2016 um 16:23 schrieb Mike Horvath:
>>>>
>>>>> Looks_like works fine with parallel lights as long as you position the
>>>>> light correctly to start off with instead of placing it at the origin
>>>>> and then translating it at some later time.
>>>>>
>>>>> Unless I made a mistake.
>>>>
>>>> Judging from the code, I see no reason why that should make any
>>>> difference.
>>>>
>>>
>>> Pulled directly from the previous version of this section:
>>>
>>> "For point lights and spotlights you could also place the light source
>>> and the looks_like object at the origin and translate them together
>>> later. But for parallel lights this will not work."
>>>
>>> Did I get it wrong? Just trying to honor what was previously mentioned!
>>
>> I can't say for sure at the moment. All I can say is that I didn't find
>> anything in the code that would explain that wording, but I might have
>> overlooked something. I guess experiments may be needed.
>>
>> Maybe the sentence was placed there not so much due to unexpected
>> effects on the looks_like object, but unexpected effects on the light
>> source itself. (For instance, whether or wheter not POV-Ray translates
>> the `point_at` location along with the parallel light source, either way
>> the effect may be surprising to some users.)
>>
>
>
> I posted a test scene in p.t.s-f.
>
>
> Mike

Oops, I was wrong. But translation is *dangerous*. As per clipka's 
response to my post:

 > With a parallel light source, the direction of all light rays depends
 > only on the /relative/ location of two points: The light source's
 > nominal center and the point_at parameter. But transformations act on
 > both these points (I've just checked the code), so a translation
 > operation changes only the absolute location of the points, not their
 > relative location to one another. And thus the light direction
 > remains unimpressed.

I.e. translating a light source translates the location of the source of 
the light *and* the location the light is pointing at, which could 
produce unwanted effects. This should be mentioned in the article. Or at 
least state that you should explicitly configure point_at to keep this 
from happening.

You might want to update this page as well:

http://wiki.povray.org/content/Knowledgebase:Language_Questions_and_Tips#Topic_1

It recommends translating the light source. Quote:

 > It's a good idea to define both things, the light_source and the
 > looks_like object, at the origin, and then translate them to their
 > right place...


Mike


Post a reply to this message

From: Alain
Subject: Re: looks_like suggestion
Date: 15 Sep 2016 14:07:58
Message: <57dae37e$1@news.povray.org>
Le 16-09-14 à 21:33, Mike Horvath a écrit :
> On 9/12/2016 10:43 AM, Mike Horvath wrote:
>> On 9/12/2016 7:56 AM, clipka wrote:
>>> Am 12.09.2016 um 12:45 schrieb Jim Holsenback:
>>>> On 9/11/2016 1:55 PM, clipka wrote:
>>>>> Am 11.09.2016 um 16:23 schrieb Mike Horvath:
>>>>>
>>>>>> Looks_like works fine with parallel lights as long as you position
>>>>>> the
>>>>>> light correctly to start off with instead of placing it at the origin
>>>>>> and then translating it at some later time.
>>>>>>
>>>>>> Unless I made a mistake.
>>>>>
>>>>> Judging from the code, I see no reason why that should make any
>>>>> difference.
>>>>>
>>>>
>>>> Pulled directly from the previous version of this section:
>>>>
>>>> "For point lights and spotlights you could also place the light source
>>>> and the looks_like object at the origin and translate them together
>>>> later. But for parallel lights this will not work."
>>>>
>>>> Did I get it wrong? Just trying to honor what was previously mentioned!
>>>
>>> I can't say for sure at the moment. All I can say is that I didn't find
>>> anything in the code that would explain that wording, but I might have
>>> overlooked something. I guess experiments may be needed.
>>>
>>> Maybe the sentence was placed there not so much due to unexpected
>>> effects on the looks_like object, but unexpected effects on the light
>>> source itself. (For instance, whether or wheter not POV-Ray translates
>>> the `point_at` location along with the parallel light source, either way
>>> the effect may be surprising to some users.)
>>>
>>
>>
>> I posted a test scene in p.t.s-f.
>>
>>
>> Mike
>
> Oops, I was wrong. But translation is *dangerous*. As per clipka's
> response to my post:
>
>> With a parallel light source, the direction of all light rays depends
>> only on the /relative/ location of two points: The light source's
>> nominal center and the point_at parameter. But transformations act on
>> both these points (I've just checked the code), so a translation
>> operation changes only the absolute location of the points, not their
>> relative location to one another. And thus the light direction
>> remains unimpressed.
>
> I.e. translating a light source translates the location of the source of
> the light *and* the location the light is pointing at, which could
> produce unwanted effects. This should be mentioned in the article. Or at
> least state that you should explicitly configure point_at to keep this
> from happening.
>
> You might want to update this page as well:
>
> http://wiki.povray.org/content/Knowledgebase:Language_Questions_and_Tips#Topic_1
>
>
> It recommends translating the light source. Quote:
>
>> It's a good idea to define both things, the light_source and the
>> looks_like object, at the origin, and then translate them to their
>> right place...
>
>
> Mike

This also apply to spotlight and cylinder light.

Whenever you translate a spotlight, a parallel light or a cylinder 
light, it's orientation always remain unchanged. If you want to change 
the orientation, you need to rotate it.
For me, it's pretty obvious, but it seems that it's not the case for 
everybody.


Alain


Post a reply to this message

From: Mike Horvath
Subject: Re: looks_like suggestion
Date: 15 Sep 2016 16:03:15
Message: <57dafe83$1@news.povray.org>
On 9/15/2016 2:08 PM, Alain wrote:
> Le 16-09-14 à 21:33, Mike Horvath a écrit :
>> On 9/12/2016 10:43 AM, Mike Horvath wrote:
>>> On 9/12/2016 7:56 AM, clipka wrote:
>>>> Am 12.09.2016 um 12:45 schrieb Jim Holsenback:
>>>>> On 9/11/2016 1:55 PM, clipka wrote:
>>>>>> Am 11.09.2016 um 16:23 schrieb Mike Horvath:
>>>>>>
>>>>>>> Looks_like works fine with parallel lights as long as you position
>>>>>>> the
>>>>>>> light correctly to start off with instead of placing it at the
>>>>>>> origin
>>>>>>> and then translating it at some later time.
>>>>>>>
>>>>>>> Unless I made a mistake.
>>>>>>
>>>>>> Judging from the code, I see no reason why that should make any
>>>>>> difference.
>>>>>>
>>>>>
>>>>> Pulled directly from the previous version of this section:
>>>>>
>>>>> "For point lights and spotlights you could also place the light source
>>>>> and the looks_like object at the origin and translate them together
>>>>> later. But for parallel lights this will not work."
>>>>>
>>>>> Did I get it wrong? Just trying to honor what was previously
>>>>> mentioned!
>>>>
>>>> I can't say for sure at the moment. All I can say is that I didn't find
>>>> anything in the code that would explain that wording, but I might have
>>>> overlooked something. I guess experiments may be needed.
>>>>
>>>> Maybe the sentence was placed there not so much due to unexpected
>>>> effects on the looks_like object, but unexpected effects on the light
>>>> source itself. (For instance, whether or wheter not POV-Ray translates
>>>> the `point_at` location along with the parallel light source, either
>>>> way
>>>> the effect may be surprising to some users.)
>>>>
>>>
>>>
>>> I posted a test scene in p.t.s-f.
>>>
>>>
>>> Mike
>>
>> Oops, I was wrong. But translation is *dangerous*. As per clipka's
>> response to my post:
>>
>>> With a parallel light source, the direction of all light rays depends
>>> only on the /relative/ location of two points: The light source's
>>> nominal center and the point_at parameter. But transformations act on
>>> both these points (I've just checked the code), so a translation
>>> operation changes only the absolute location of the points, not their
>>> relative location to one another. And thus the light direction
>>> remains unimpressed.
>>
>> I.e. translating a light source translates the location of the source of
>> the light *and* the location the light is pointing at, which could
>> produce unwanted effects. This should be mentioned in the article. Or at
>> least state that you should explicitly configure point_at to keep this
>> from happening.
>>
>> You might want to update this page as well:
>>
>> http://wiki.povray.org/content/Knowledgebase:Language_Questions_and_Tips#Topic_1
>>
>>
>>
>> It recommends translating the light source. Quote:
>>
>>> It's a good idea to define both things, the light_source and the
>>> looks_like object, at the origin, and then translate them to their
>>> right place...
>>
>>
>> Mike
>
> This also apply to spotlight and cylinder light.
>
> Whenever you translate a spotlight, a parallel light or a cylinder
> light, it's orientation always remain unchanged. If you want to change
> the orientation, you need to rotate it.
> For me, it's pretty obvious, but it seems that it's not the case for
> everybody.
>
>
> Alain

I haven't seen /point_at/ used in many demo scenes either. I don't think 
the "Ready made scenes" that come with POV-Ray use /point_at/. I never 
knew it was so important.

Mike


Post a reply to this message

From: Alain
Subject: Re: looks_like suggestion
Date: 16 Sep 2016 13:51:10
Message: <57dc310e@news.povray.org>
Le 16-09-15 à 16:03, Mike Horvath a écrit :
> On 9/15/2016 2:08 PM, Alain wrote:
>> Le 16-09-14 à 21:33, Mike Horvath a écrit :
>>> On 9/12/2016 10:43 AM, Mike Horvath wrote:
>>>> On 9/12/2016 7:56 AM, clipka wrote:
>>>>> Am 12.09.2016 um 12:45 schrieb Jim Holsenback:
>>>>>> On 9/11/2016 1:55 PM, clipka wrote:
>>>>>>> Am 11.09.2016 um 16:23 schrieb Mike Horvath:
>>>>>>>
>>>>>>>> Looks_like works fine with parallel lights as long as you position
>>>>>>>> the
>>>>>>>> light correctly to start off with instead of placing it at the
>>>>>>>> origin
>>>>>>>> and then translating it at some later time.
>>>>>>>>
>>>>>>>> Unless I made a mistake.
>>>>>>>
>>>>>>> Judging from the code, I see no reason why that should make any
>>>>>>> difference.
>>>>>>>
>>>>>>
>>>>>> Pulled directly from the previous version of this section:
>>>>>>
>>>>>> "For point lights and spotlights you could also place the light
>>>>>> source
>>>>>> and the looks_like object at the origin and translate them together
>>>>>> later. But for parallel lights this will not work."
>>>>>>
>>>>>> Did I get it wrong? Just trying to honor what was previously
>>>>>> mentioned!
>>>>>
>>>>> I can't say for sure at the moment. All I can say is that I didn't
>>>>> find
>>>>> anything in the code that would explain that wording, but I might have
>>>>> overlooked something. I guess experiments may be needed.
>>>>>
>>>>> Maybe the sentence was placed there not so much due to unexpected
>>>>> effects on the looks_like object, but unexpected effects on the light
>>>>> source itself. (For instance, whether or wheter not POV-Ray translates
>>>>> the `point_at` location along with the parallel light source, either
>>>>> way
>>>>> the effect may be surprising to some users.)
>>>>>
>>>>
>>>>
>>>> I posted a test scene in p.t.s-f.
>>>>
>>>>
>>>> Mike
>>>
>>> Oops, I was wrong. But translation is *dangerous*. As per clipka's
>>> response to my post:
>>>
>>>> With a parallel light source, the direction of all light rays depends
>>>> only on the /relative/ location of two points: The light source's
>>>> nominal center and the point_at parameter. But transformations act on
>>>> both these points (I've just checked the code), so a translation
>>>> operation changes only the absolute location of the points, not their
>>>> relative location to one another. And thus the light direction
>>>> remains unimpressed.
>>>
>>> I.e. translating a light source translates the location of the source of
>>> the light *and* the location the light is pointing at, which could
>>> produce unwanted effects. This should be mentioned in the article. Or at
>>> least state that you should explicitly configure point_at to keep this
>>> from happening.
>>>
>>> You might want to update this page as well:
>>>
>>> http://wiki.povray.org/content/Knowledgebase:Language_Questions_and_Tips#Topic_1
>>>
>>>
>>>
>>>
>>> It recommends translating the light source. Quote:
>>>
>>>> It's a good idea to define both things, the light_source and the
>>>> looks_like object, at the origin, and then translate them to their
>>>> right place...
>>>
>>>
>>> Mike
>>
>> This also apply to spotlight and cylinder light.
>>
>> Whenever you translate a spotlight, a parallel light or a cylinder
>> light, it's orientation always remain unchanged. If you want to change
>> the orientation, you need to rotate it.
>> For me, it's pretty obvious, but it seems that it's not the case for
>> everybody.
>>
>>
>> Alain
>
> I haven't seen /point_at/ used in many demo scenes either. I don't think
> the "Ready made scenes" that come with POV-Ray use /point_at/. I never
> knew it was so important.
>
> Mike

point_at always default to <0,0,0>.
If that's where you actually direct your light to, or close to it, you 
may not need to explicitly set it. That's often the case when using 
parallel and your light_source is relatively far, and created directly 
in it's final location.

There is a problem with the default point_at when the light is also 
created at the origin as the direction of your light becomes undefined. 
Translating the light to it's final location can fix things as the 
default poin_at location will be translated at the same time as the 
location.
It should be noted that a parallel light_source will also illuminate 
things behind it's location, away from the point_at location. In this 
case, shadows *will NOT* be calculated.
So, if you define your parallel light at the origin and later translate 
it, ALL your scene may end up "behind" it, and it act like a shadowless 
light or as if everything had the no_shadow option turned ON.


Alain


Post a reply to this message

From: clipka
Subject: Re: looks_like suggestion
Date: 17 Sep 2016 08:27:41
Message: <57dd36bd@news.povray.org>
Am 16.09.2016 um 19:51 schrieb Alain:

> point_at always default to <0,0,0>.

Actually, no, it doesn't.

It defaults to <0,0,1>.


Post a reply to this message

From: Jim Holsenback
Subject: Re: looks_like suggestion
Date: 17 Sep 2016 09:01:51
Message: <57dd3ebf$1@news.povray.org>
On 9/17/2016 8:27 AM, clipka wrote:
> Am 16.09.2016 um 19:51 schrieb Alain:
>
>> point_at always default to <0,0,0>.
>
> Actually, no, it doesn't.
>
> It defaults to <0,0,1>.
>
so the docs are wrong then?

http://wiki.povray.org/content/Reference:Light_Source


Post a reply to this message

From: clipka
Subject: Re: looks_like suggestion
Date: 17 Sep 2016 10:17:53
Message: <57dd5091$1@news.povray.org>
Am 17.09.2016 um 15:01 schrieb Jim Holsenback:
> On 9/17/2016 8:27 AM, clipka wrote:
>> Am 16.09.2016 um 19:51 schrieb Alain:
>>
>>> point_at always default to <0,0,0>.
>>
>> Actually, no, it doesn't.
>>
>> It defaults to <0,0,1>.
>>
> so the docs are wrong then?
> 
> http://wiki.povray.org/content/Reference:Light_Source

Yes, apparently. The source code is quite clear on this.


Post a reply to this message

From: Jim Holsenback
Subject: Re: looks_like suggestion
Date: 17 Sep 2016 10:27:08
Message: <57dd52bc$1@news.povray.org>
On 9/17/2016 10:17 AM, clipka wrote:
> Am 17.09.2016 um 15:01 schrieb Jim Holsenback:
>> On 9/17/2016 8:27 AM, clipka wrote:
>>> Am 16.09.2016 um 19:51 schrieb Alain:
>>>
>>>> point_at always default to <0,0,0>.
>>>
>>> Actually, no, it doesn't.
>>>
>>> It defaults to <0,0,1>.
>>>
>> so the docs are wrong then?
>>
>> http://wiki.povray.org/content/Reference:Light_Source
>
> Yes, apparently. The source code is quite clear on this.
>

quelle suprise ... corrected


Post a reply to this message

From: Mike Horvath
Subject: Re: looks_like suggestion
Date: 17 Sep 2016 14:07:48
Message: <57dd8674$1@news.povray.org>
On 9/17/2016 9:01 AM, Jim Holsenback wrote:
> On 9/17/2016 8:27 AM, clipka wrote:
>> Am 16.09.2016 um 19:51 schrieb Alain:
>>
>>> point_at always default to <0,0,0>.
>>
>> Actually, no, it doesn't.
>>
>> It defaults to <0,0,1>.
>>
> so the docs are wrong then?
>
> http://wiki.povray.org/content/Reference:Light_Source

Not just the docs, but the demo scenes too. Like I said.


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: looks_like suggestion
Date: 17 Sep 2016 14:15:57
Message: <57dd885d$1@news.povray.org>
On 9/17/2016 2:08 PM, Mike Horvath wrote:
> On 9/17/2016 9:01 AM, Jim Holsenback wrote:
>> On 9/17/2016 8:27 AM, clipka wrote:
>>> Am 16.09.2016 um 19:51 schrieb Alain:
>>>
>>>> point_at always default to <0,0,0>.
>>>
>>> Actually, no, it doesn't.
>>>
>>> It defaults to <0,0,1>.
>>>
>> so the docs are wrong then?
>>
>> http://wiki.povray.org/content/Reference:Light_Source
>
> Not just the docs, but the demo scenes too. Like I said.
>
>
> Mike

Unless you edit the source code so that the default position becomes 
<0,0,0>.

Mike


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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