Stereoscopic rendering

Forums: 

As mentioned on the OCCT visualization tools project page, there is on-going development around implementation of stereoscopic rendering in OCCT 3D viewer. We are proud to share some intermediate results with the community.

As of today, the following basic capabilities have been implemented:

  • Graphic3d_Camera class that encapsulates calculation of OpenGL matrices for orthographic and perspective projection, including stereo rendering mode. Currently the camera exists in parallel with old view mapping and view orientation objects, but the two latter will be replaced completely by the camera in the future.
  • Stereoscopic effect is driven by two parameters: inter-ocular distance (IOD) and stereoscopic focus (Z focus).
  • Quad-buffered stereo rendering procedure at OpenGl package level - note that it requires hardware support (tested with NVIDIA Quadro K4000 GPU), or better to say, available types of stereoscopy depend on the graphic card, graphic driver and display device or DLP projector in use.
  • Standard MFC samples enriched with the stereoscopic mode controls (turn stereo on/off, adjust IOD and Z focus).

The current development results can be obtained from OCCT Git branch CR24001_660.
Note that the code works currently under Windows only!

The following pending issues are still to be addressed:

  • Improved and cross-platform procedure for switching between normal and stereoscopic rendering modes (OpenGL rendering context re-creation - ideally, with OpenGL resources sharing).
  • Complete replacement of view mapping and view orientation by Graphic3d_Camera class, with redesign of all viewing operations.
  • Adaptation of OCCT detection algorithm for use with Graphic3d_Camera, in particular taking stereoscopic mode into account.
  • Enabling stereo mode in all OCCT samples.

As a further improvement, support for different stereo viewing devices (e.g. for anaglyph color glasses) can be added in the future at OCCT level so as to decrease dependency on graphic driver capabilities.

Some snapshots can be found on OCCT visualization tools project page

Pawel's picture

Dear Sergey,

I'm glad to see this functionality in OCCT!

Although I haven't compiled the corresponding branch yet, I have a question though: Is it possible to render 3D anaglyphs (red-blue, red-green color shifts etc.) in order to test on budget-hardware without having to purchase filters/glasses?

Pawel

Andrey BETENEV's picture

Hello Pawel,

In my understanding anaglyphs are already there, check snapshots on the project page. Note that there you can switch between different modes of representation to make use of the hardware you have.

Andrey

Kirill Gavrilov's picture

Dear Pawel,

current implementation uses OpenGL Quad Buffer for stereoscopic rendering and the actual list of supported devices depends on OpenGL driver. Most drivers implement support for shutter glasses, since only within special drivers support this technology might be used.

Notice that for historical reasons Quad Buffer was one of the exclusive features of professional cards (NVIDIA Quadro, ATi FireGL, Matrox Parhelia) and wasn't available for desktop cards.

Nowadays, this situation is in intermediate stage. For instance, recent AMD Catalyst for Windows 7 supports Quad Buffer for their Radeon GPUs, but only within full-screen mode and compatible shutter glasses. There are some changes in Windows 8 but I have not seen it yet.