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