POV-Ray : Newsgroups : povray.newusers : lens shift camera : Re: lens shift camera Server Time
13 Jun 2024 12:24:38 EDT (-0400)
  Re: lens shift camera  
From: Doctor John
Date: 11 Sep 2009 06:25:33
Message: <4aaa259d@news.povray.org>
tony wrote:
> Has povray lens shift camera for architecture? How to do?
> 
> Thank you all.
> 
> Tony
> 
> 

OK, Tony, i've now had a chance to play with your code.
Firstly, I don't quite understand why you're using such an unusual up
vector; you run into all sorts of problems with it. I suspect that this
is a product of the conversion process from Blender to Yafray but is
totally unnecessary in Povray. I suggest you read "3.3.1.1.5 Up and
Right Vectors" in the manual to understand why and how they're used.

Secondly, the FieldCam() macro was developed with an assumption that the
majority of people would be using either the standard left-hand system
or, at a pinch, the right-hand system, so you would use 'up y' or 'up z'
respectively. The macro looks at the camera position and the look-at
point and calculates the shearing values to ensure that the image plane
is always parallel to your chosen up vector. Unfortunately in its
present incarnation these vectors can only be <0,1,0> or <0,0,1> so the
camera is acting as if it had a limited shift function i.e it cannot
shift in y and x planes simultaneously. I am thinking about extending
its functionality but the macro would then need a total rewrite.

Lastly, try this in your scene:

#declare CamPos=<7.48113,5.34367,-6.50764>;
#declare CamLook=<6.82627,4.89842,-5.896970>;

camera {
        FieldCam ()
        perspective
        location CamPos
        angle 49.1343
        right (image_width/image_height)*x
        up y
        transform {NoFall}
        look_at CamLook
}
......and don't forget to switch off your vista buffers (-uv on the
command line)

John
-- 
"Eppur si muove" - Galileo Galilei


Post a reply to this message

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