POV-Ray : Newsgroups : povray.advanced-users : Spherical camera upside-down : Re: Spherical camera upside-down Server Time
15 May 2024 11:51:41 EDT (-0400)
  Re: Spherical camera upside-down  
From: clipka
Date: 8 Sep 2016 19:40:48
Message: <57d1f700$1@news.povray.org>
Am 09.09.2016 um 01:03 schrieb Mike Horvath:
> On 9/8/2016 6:58 PM, clipka wrote:
>> Am 09.09.2016 um 00:00 schrieb Mike Horvath:
>>
>>> The camera is spherical. Do I really need to scale the "up" and "right"
>>> vectors to the image dimensions? I was under the impression that the
>>> spherical camera already automatically fills a 2:1 aspect ratio image.
>>
>> My bad, I didn't pay much attention to the camera type.
>>
>> Having had a closer look at the source code, here's my updated
>> (counter-intuitive) advice:
>>
>> - To mirror the image vertically, flip the _right_ vector.
>> - To mirror the image horizontally, flip the _up_ vector.
>> - To mirror the image vertically _and_ turn the camera 180 degrees, flip
>> the direction vector.
>>
>> Entirely untested, but that's what I infer from the source code.
> 
> I still suspect POV-Ray messes up when confronted with left-handed
> coordinate systems in the spherical camera code. My up, right, location
> and direction values work fine with a normal perspective camera. It's
> only when they are applied to a spherical camera that the results are
> incorrect.

No, POV-Ray doesn't mess up in spherical camera mode. It just uses the
`right` and `up` vectors in a weird, non-intuitive manner. As alluded in
my updated advice, `right` doesn't specify what's left and right in a
spherical camera image, nor does `up` specify what's up and down.

Instead, `direction` and `right` together specify what's up and down
(the `direction` vector rotated around the `right` vector by 90 degrees
gives you up when rotated in one particular direction, and down when
rotated in the other), and `direction` and `up` together specify what's
left and right (again the `direction` vector rotated around the `up`
vector by 90 degrees gives you left when roated in one particular
direction, and right when rotated in the other).


Post a reply to this message

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