POV-Ray : Newsgroups : povray.general : Projection matrix of a camera on povray : Re: Projection matrix of a camera on povray Server Time
29 Jul 2024 04:27:53 EDT (-0400)
  Re: Projection matrix of a camera on povray  
From: Warp
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.