Have a toggle-able fisheye lens in-game (looking through a door peephole)

Basically, I want to have a door with a peephole type thing and when you look through, it adds an overlay scene to make it look like you’re looking through it. However, I want that overlay scene to use some sort of fisheye lens (like with a spherical distortion), I just don’t know how to do that. Can anyone help?

scene.active_camera.fov = x where x is a big number like 160.

standard fov is 90 or even sometimes 100

Thanks :slight_smile: Is there a way to add any spherical distortion, like in a fisheye lens do you know? :slight_smile:

I am pretty sure this is possible by applying a 2D GLSL Filter on the scene, but I am not an Expert in GLSL. Maybe someone can help out here?

I did some more digging. As usual, when it comes to GLSL content, you most probably end up in some thread by martinsh.

Go to first post, open HDR2.0.blend, switch to Game Engine, press P to start BGE and then 6 to add Barrel distortion.

Other shaders can be found here: https://www.geeks3d.com/20140213/glsl-shader-library-fish-eye-and-dome-and-barrel-distortion-post-processing-filters/, but you would have to invest some time to get them running in the BGE, I guess.


Thank you so much! This helps a lot :smiley: