POV-Ray : Newsgroups : povray.general : Projection matrix of a camera on povray Server Time
1 Nov 2024 09:22:39 EDT (-0400)
  Projection matrix of a camera on povray (Message 1 to 3 of 3)  
From: StudentPHD
Subject: Projection matrix of a camera on povray
Date: 17 Mar 2013 17:40:01
Message: <web.51463752dce7d7bc54c63d880@news.povray.org>
Hello,

I am developping an application of 3d reconstruction. I used pov ray to generate
some testing images. I am need to calculate the projection matrix of camera.
please help me


Post a reply to this message

From: Le Forgeron
Subject: Re: Projection matrix of a camera on povray
Date: 18 Mar 2013 13:29:46
Message: <51474f0a$1@news.povray.org>
Le 17/03/2013 22:36, StudentPHD nous fit lire :
> Hello,
> 
> I am developping an application of 3d reconstruction. I used pov ray to generate
> some testing images. I am need to calculate the projection matrix of camera.
> please help me
> 
> 
It's all in the documentation, but some camera type cannot be described
with a projection matrix.

http://wiki.povray.org/content/Documentation:Camera


Post a reply to this message

From: Warp
Subject: Re: Projection matrix of a camera on povray
Date: 18 Mar 2013 13:41:24
Message: <514751c3@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> It's all in the documentation, but some camera type cannot be described
> with a projection matrix.

Btw, the reason why raytracing allows for a much more varied types of
projections than what scanline renderers usually support is because,
while the rays shot from the camera have to be straight (curved rays
are way too difficult to trace), there's no limitation whatsoever on
the direction towards which each individual camera ray can be shot
towards.

In scanline renderers, however, the direction is the reverse: Objects,
such as triangles, are projected onto the camera. While you could
ostensibly project the triangle vertices as you want, the triangle
edges will still be straight (because the edges themselves are not
projected onto the camera, only the vertices) so it wouldn't help much.

This makes things like fisheye cameras completely trivial to implement
in a raytracer but very laborious to implement in scanline renderers.

It's lucky that a strict perspective projection, which can be described
with a 4x4 matrix, happens to produce images that are close to what the
human eye sees as well (so close that the brain is quite forgiving of
such very small variations, so we don't even notice.) This makes it much
easier to make scanline renderers, which is what allows us to have modern
3D games. If we had strong fisheyes, things could be quite different.

-- 
                                                          - Warp


Post a reply to this message

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