POV-Ray : Newsgroups : povray.documentation.inbuilt : looks_like suggestion : Re: looks_like suggestion Server Time
24 Apr 2024 06:02:12 EDT (-0400)
  Re: looks_like suggestion  
From: Alain
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

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