View Full Version : Eyefish matrix?

04-09-2004, 07:24 AM
I would like to render a scene using an eyefish camera, this is a camera with a 180 degrees of field of view, but with a projection hemisphere instead of a projection plane (pin-hole camera). How can I do this in OpenGL?

04-09-2004, 08:08 AM
I think a fisheye lense is a non-linear projection, so to get a full 180-degree view, you may have to render in pieces and then piece the result together by stretching it.

Tom Nuydens
04-09-2004, 08:47 AM
Look up "dual paraboloid mapping", an environment mapping technique that uses two maps rendered with a 180-degree FOV. I have a dual paraboloid shadow mapping demo on www.delphi3d.net (http://www.delphi3d.net) , for example, which contains a vertex shader that implements the kind of projection you want.

Like endash said, though, the projection is nonlinear. If you want to implement it in a vertex shader then you need to make sure your geometry is tessellated finely enough to avoid artefacts.

-- Tom