POV-Ray : Newsgroups : povray.general : perspective user defined camera? : Re: perspective user defined camera? Server Time
1 May 2024 01:19:02 EDT (-0400)
  Re: perspective user defined camera?  
From: Tor Olav Kristensen
Date: 8 Jun 2019 15:30:00
Message: <web.5cfc0b7462f2921969f45c250@news.povray.org>
"IGM" <iar### [at] gmailcom> wrote:
> Hi,
> the two alternative cameras, the standard perspective camera and the
> ucdPerspective camera, give different images if the pLookAt is not perfectly
> <0.0, 0.0, 1.0>. Try commenting the respective row.
> Can we explain and fix this?
>...

Hi IGM

Please note that Ingo warned that the user defined camera macros he posted were
"very unfinished".

According to the documentation for POV-Ray's camera:
https://www.povray.org/documentation/3.7.0/r3_4.html#r3_4_2
- it seems that POV-Ray performs the look_at transform by first panning and then
tilting the camera.
(See 3.4.2.1.1 Location and Look_At)

The code that I posted did this in a single reorientation.

If this reorientation is split up in two steps (first panning and then tilting),
the results seem to be the same for the created user defined camera and the
built in perspective camera.

You can do this by changing the expression for the LookAtTransform in Ingo's
ucdLookAtTransform macro, like this:

    #local LookAtTransform =
        transform {
            Reorient_Trans(z, vLookAt*(x + z))  // Pan
            Reorient_Trans(vLookAt*(x + z), vLookAt)  // Tilt
        }

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

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