POV-Ray : Newsgroups : povray.newusers : Tilt/Shift lens : Re: Tilt/Shift lens Server Time
28 Jul 2024 16:20:39 EDT (-0400)
  Re: Tilt/Shift lens  
From: Doctor John
Date: 30 May 2008 09:34:15
Message: <48400257$1@news.povray.org>
alex wrote:
> 
> I think that you cannot specify a non-perpendicular direction vector using
> look_at *and* direction (I don't have sources handy to check that), but using
> transform you do and that's why I didn't get different result varying the
> direction vector.
> 
> The camera specification I was using was:
> camera {
>         perspective //keyword is facultative in this case
>         location <50,10,30>
>         direction vnormalize(Direction)
>         look_at <0,10,0>
>         blur_samples 120 //add samples if you got a fast computer
>         aperture 10
>         focal_point <5,10,5>
> }
> (from focalblur.pov)
> 
> whatever Direction is, the plane of focus does not change.
> 
> But if I use this specification:
> #declare S_angle=(CamLook.y-CamLoc.y)/CamLoc.z;
> 
> #declare Shear= transform {
>    matrix <  1,  0,  0,
>              0,  1,  -S_angle,
>              0,  0,  1,
>              0,  0,  0 >
> }
> camera {
>         perspective //keyword is facultative in this case
>         location CamLoc
>         angle 90
>         transform Shear // comment out to see 'falling buildings'
>         rotate <0,45,0>
>         look_at CamLook
> 
>         blur_samples 120 //add samples if you got a fast computer
>         aperture 10
>         focal_point CamLook
>         }
> (from shear.pov)
> 
> the focal plane is *not* parallel to the image plane.
> Just add focal blur to the shear.pov example scene and see for yourself.
> 
> I think that the focal plane is (correctly) parallel to the image plane only
> when the camera vectors are perpendicular.
> 
> Exactly what I was looking for. :)
> 
> Now, all I need is a ton of help in working out the transormations needed to
> emulate a tilt/shift lens....any volunteers?
> 
> --alex
> 
> 
Greetings, all. I have a macro that simulates a shifted lens which may
help you. I will repost it in p.b.s-f. as FieldCam.zip. In the zip are
three folders; one for Mac users, one for Unix users and one for M$
users. Hope it helps

John

-- 
I will be brief but not nearly so brief as Salvador Dali, who gave the
world's shortest speech. He said, "I will be so brief I am already
finished," then he sat down.


Post a reply to this message

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