Stereoscopic Camera in OpenGL using PyOpenGL

PyOpenGL - Stereoscopic camera demo
Stereoscopic camera demo

The guys at have released two OpenGL demos about stereoscopic cameras. These demos have been coded with PyOpenGL so it’s really easy to test and tweak them.

You can download the OpenGL demos HERE.

There are four principle approaches to the setup of stereoscopic cameras:

  • Toed-in (“verging”) cameras: In this approach the cameras are rotated so the lens axes verge at a point. Objects in the scene at the same depth as this point will appear close to the plane of the image in the final stereoscopic presentation, other objects will appear in-front or behind this point. This approach is often used for natural imaging, i.e. photography, video and film, but it introduces geometric errors which reduce quality and need to be removed in post-production.
  • Parallel cameras: Images for human-viewing should ideally be taken with parallel axis cameras, and this approach can be used in almost all computer graphics imagery. The reason it is not always used for photographic images is that real camera bodies have physical size and often cannot be brought close enough together to capture the desired depth effect, hence they have to be toed-in. The need to vary camera separation comes about because stereoscopic displays each have their own working range or “depth budget” and hence need different camera setups.
  • Automated stereoscopic camera (ASC) methods (see HERE for more details)
  • Multi-rig camera methods (see HERE for more details)

The OpenGL demos show the toed-in and parallel cameras. You can launch each demo with three different parameters:

  • python SHUTTER: requires quad buffered hardware and stereoscopic display drivers. I couldn’t manage to run it because I don’t have such a display driver.
  • python ANAGLYPH: requires red/green glasses viewing mode. The post head image shows the rendering of this demo.
  • python NONE: monoscopic (draws left eye view only):

    PyOpenGL - Monoscopic camera demo
    Monoscopic camera demo


One thought on “Stereoscopic Camera in OpenGL using PyOpenGL”

  1. Pingback: [Test] Stereoscopic 3D Rendering With Anaglyph Images - 3D Tech News, Pixel Hacking, Data Visualization and 3D Programming -

Comments are closed.