|
|
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
|
|
|
|
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
|
|