Arbitrary FOV (360° Camera)

Hi Community,

I’m relatively new to OpenGL but am still working on a fairly advanced task. I need a viewer that allows scene-views using arbitrary FOVs. One could call it a virtual 360° Camera. It is obvious that the pinhole-camera-model can not provide such a view, since it’s projection surface is a rectangle. So what I need is a central projection onto a non-2D object (e.g. a cylinder or a cube) whose surface is than used as the viewport-information. Since an unrolled cylinder provides a rectangular surface it would be a sufficient choice (although only for one axis, since it’s ends are not covered).

Does anyone know of any existing code dedicated to this problem? If not, does anyone have an idea how to achieve the desired result.


Most use a cube. 90 degrees FOV, render the scene 6 times, to each face. Accessing that cube’s data is hardware-accelerated.

Well, your task arises when one needs to do shadow mapping for omni-directional lights.
Try looking into Dual-Paraboloid projection first.

I’d go with the cubemap approach, it’s really quite simple to do and the results are very good. That’s also used for dynamic environment mapping, you may find some tutorials about that.