POV-Ray : Newsgroups : povray.newusers : Projection matrix Server Time
29 Jul 2024 16:19:52 EDT (-0400)
  Projection matrix (Message 1 to 3 of 3)  
From: pare03
Subject: Projection matrix
Date: 2 Nov 2005 17:40:00
Message: <web.436940227c8cb4f029d68ff20@news.povray.org>
Hi,

I would like to know if there is a way to extract the 4x4 projection matrix
from a perspective camera declared in Povray.  I currently have these
camera settings:

camera
{
    perspective
    location <-49.61, 1.18, 0.44>
    angle 32.58
    look_at <0.00, 1.18, 0.44>
    right 4/3*x
    up y
    sky -z
}

Is there a way to do so ?

Thank you !
David.


Post a reply to this message

From: Slime
Subject: Re: Projection matrix
Date: 2 Nov 2005 17:59:53
Message: <436944e9$1@news.povray.org>
> I would like to know if there is a way to extract the 4x4 projection
matrix
> from a perspective camera declared in Povray.

Not directly, because POV-Ray doesn't use one internally. You'll probably
have to work it out yourself.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: ABX
Subject: Re: Projection matrix
Date: 21 Nov 2005 07:17:04
Message: <9he3o1dol2ttdei3aq6hvfputmf9vic93l@4ax.com>
On Wed,  2 Nov 2005 17:39:30 EST, "pare03" <par### [at] gelulavalca> wrote:
> I would like to know if there is a way to extract the 4x4 projection matrix
> from a perspective camera declared in Povray.  I currently have these
> camera settings:
>
> camera
> {
>     perspective
>     location <-49.61, 1.18, 0.44>
>     angle 32.58
>     look_at <0.00, 1.18, 0.44>
>     right 4/3*x
>     up y
>     sky -z
> }
>
> Is there a way to do so ?

You can try to setup camera with macros of screen.inc include file. These
macros internally declare transform Camera_Transform which contains matrix of
current camera. See how it is done there.

ABX


Post a reply to this message

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