Camera principle axis

Hi im thinking about using OpenCascade for a virtual reality solution to overlay 3d data in a real environment. To do this I must be able to set up the OpenCascade camera to match a real camera (Pinhole camera model)

A real camera has the following parameters:

3d position / 3d orientation

Field of View (angle)

X/Y Resolution

Principle axis offset

Im certain opencascade supports all of the above except perhaps the principle axis offset. Other 3d frameworks may call this the projection offset (Offcenter projection)

Is there a documentation of the opencascade camera projection matrix anywhere? Or does anyone know if the projection offset can be set for the camera(or the viewport?)




Kirill Gavrilov's picture

Graphic3d_Camera is the main class providing camera definition in OCCT - so that you may check all documentation and even dive into source code to see how projection matrix is actually computed. The camera does not have parameters like "principle axis offset", so that if you find it missing and other parameters cannot produce similar result - consider contributing a patch to OCCT or using technical Support services for solving your task.

What camera currently allows to do is defining an Asymmetric frustum parallel axis projection applicable for rendering stereoscopic pair on classical 3D displays.
This definition is managed by IOD and ZFocus parameters.

In case of HMD stereoscopic pair, standard definition might be not enough due to trickery lenses orientation in modern headsets. For this reason, OpenVR and OpenXR define property returning 4 FOV angles for defining an arbitrary projection matrix. WebXR goes further and states that

The projection matrix MAY include transformations such as shearing that prevent the projection from being accurately described by a simple frustum.

so that WebXR does not provide FOV frustum definition and instead allows getting only 4x4 projection matrix.