POV-Ray : Newsgroups : povray.newusers : Tilt/Shift lens Server Time
1 Nov 2024 14:17:27 EDT (-0400)
  Tilt/Shift lens (Message 1 to 7 of 7)  
From: alex
Subject: Tilt/Shift lens
Date: 27 May 2008 06:20:00
Message: <web.483be008996acb542d5f88720@news.povray.org>
Hi all,
is it possible to simulate a tilt/shift lens in POV-Ray?
I'm after the non-parallel plane-of-focus effect.

I browsed around in the docs, but I couldn't find anything related to.


Post a reply to this message

From: Alain
Subject: Re: Tilt/Shift lens
Date: 27 May 2008 09:56:21
Message: <483c1305$1@news.povray.org>
alex nous illumina en ce 2008-05-27 06:18 -->
> Hi all,
> is it possible to simulate a tilt/shift lens in POV-Ray?
> I'm after the non-parallel plane-of-focus effect.
> 
> I browsed around in the docs, but I couldn't find anything related to.
> 
> 
> 
> 
You can use non-perpendicular direction, right and sky vectors.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you're starting to find these 
quotes more unsettling than funny.
     -- Alex McLeod a.k.a. Giant Robot Messiah


Post a reply to this message

From: alex
Subject: Re: Tilt/Shift lens
Date: 27 May 2008 11:05:03
Message: <web.483c22faa19f761b2d5f88720@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> alex nous illumina en ce 2008-05-27 06:18 -->
> > Hi all,
> > is it possible to simulate a tilt/shift lens in POV-Ray?
> > I'm after the non-parallel plane-of-focus effect.
> >
> > I browsed around in the docs, but I couldn't find anything related to.
> >
> >
> >
> >
> You can use non-perpendicular direction, right and sky vectors.
>
> --
> Alain
> -------------------------------------------------
> You know you've been raytracing too long when you're starting to find these
> quotes more unsettling than funny.
>      -- Alex McLeod a.k.a. Giant Robot Messiah

I don't think so...

I tried to modify focalblur.pov from the examples:
I removed the angle keyword and I added a direction vector, but whatever the
direction vector is, the rendering is the same as if the direction vector is
not specified (as long as the vector is normalized).

Could it be that the focal blur ignores the director vector's direction?


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Tilt/Shift lens
Date: 28 May 2008 02:57:08
Message: <483d0244$1@news.povray.org>
alex wrote:
> Could it be that the focal blur ignores the director vector's direction?

That is how it is documented ;-)
http://www.povray.org/documentation/view/3.6.1/248/

	Thorsten


Post a reply to this message

From: alex
Subject: Re: Tilt/Shift lens
Date: 28 May 2008 12:25:00
Message: <web.483d8702a19f761b2d5f88720@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
> alex wrote:
> > Could it be that the focal blur ignores the director vector's direction?
>
> That is how it is documented ;-)
> http://www.povray.org/documentation/view/3.6.1/248/
>
>  Thorsten

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


Post a reply to this message

From: Alain
Subject: Re: Tilt/Shift lens
Date: 28 May 2008 14:51:14
Message: <483da9a2$1@news.povray.org>
alex nous illumina en ce 2008-05-27 11:04 -->
> Alain <ele### [at] netscapenet> wrote:
>> alex nous illumina en ce 2008-05-27 06:18 -->
>>> Hi all,
>>> is it possible to simulate a tilt/shift lens in POV-Ray?
>>> I'm after the non-parallel plane-of-focus effect.
>>>
>>> I browsed around in the docs, but I couldn't find anything related to.
>>>
>>>
>>>
>>>
>> You can use non-perpendicular direction, right and sky vectors.
>>
>> --
>> Alain
>> -------------------------------------------------
>> You know you've been raytracing too long when you're starting to find these
>> quotes more unsettling than funny.
>>      -- Alex McLeod a.k.a. Giant Robot Messiah
> 
> I don't think so...
> 
> I tried to modify focalblur.pov from the examples:
> I removed the angle keyword and I added a direction vector, but whatever the
> direction vector is, the rendering is the same as if the direction vector is
> not specified (as long as the vector is normalized).
> 
> Could it be that the focal blur ignores the director vector's direction?
> 
> 
> 
Try this camera:
camera{location 0 direction<0.2,0,1> sky<0.1,1,0.1> right<1.5,0,0.01>}
-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you're starting to find these 
quotes more unsettling than funny.
     -- Alex McLeod a.k.a. Giant Robot Messiah


Post a reply to this message

From: Doctor John
Subject: Re: Tilt/Shift lens
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.