True fisheye / 180º fov Opengl Camera?

Brecht's icon

Hi all! I'm trying to figure out whether it is at all possible to create a real fisheye lens for openGL in Jitter. So not the stretched polygons you get when bringing the lens_angle up, nor a shader that is basically a 'bulge' or 'pinch' effect, but true 180º field of view..? Any pointers?

Andro's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Heres an old patch I'd found on the forums that someone else made :) ( www.dietervandoren.net )
Maybe it'll get you started

Brecht's icon

Thanks for the reply.
So if I understand correctly what you're saying is that the approach will involve multiple views stitched together into 1 final output.

Andro's icon

well yeah, by putting 3 cameras on the same line .. lets say
Camera 1 position -1. 0. 0.
Cam 2 0. 0. 0.
cam 3 1. 0. 0.

each of those sends its output to a jit.gl.videoplane and you get a basic panorama.

if all the cameras are at position 0. 0. 0. but with different rotatexyz settings
cam 1 rotatexyz -45. 0. 0.
cam 2 0. 0. 0.
cam 3 45. 0. 0.

that should give you a pretty close 180 degree field of view
You don't have to stitch the videoscreens as thats already done in the patch I uploaded.

Niculin Barandun's icon

Hey Brecht

Did you have any success with creating the fisheye lens? Im trying to do the same for dome projection. With the technique from Andro i can't come close to a true fisheye lens. I think to get close to a true 180° fisheye, you would need render a cubemap with 6 cameras, and then map this cubemap to a sphere. Now you can have a camera in the center of this sphere which you can rotate to pan, tilt and roll and move the 6 cameras together to change the position.

I try to remember and post a patch here if i succeed.

Yoann's icon

Any solution, 5 years later ?