Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fisheye projection matrix in Xna/OpenGL - 3D

I'm looking for a projection matrix I can use in 3D that will give me the effect of a fisheye. I'm not looking for a pixelshader or anything like that, that will manipulate pixels - but the actual projection matrix used in projecting from 3D space onto 2D.

Thanks.

like image 290
Einar Ingebrigtsen Avatar asked Jul 17 '10 20:07

Einar Ingebrigtsen


2 Answers

That's not really possible. In homogeneous coordinates, matrices transform lines to lines. So any solution based solely on matrices will necessarily fail to bend lines like you want to.

like image 97
Carlos Scheidegger Avatar answered Nov 05 '22 15:11

Carlos Scheidegger


Carlos isn't wrong but you might want to try playing with the "field of view (FOV)" parameter in your projection matrix builder.

like image 3
Goz Avatar answered Nov 05 '22 15:11

Goz