Creating Cameras

Pyrender supports three camera types – PerspectiveCamera and IntrinsicsCamera types, which render scenes as a human would see them, and OrthographicCamera types, which preserve distances between points.

Creating cameras is easy – just specify their basic attributes:

>>> pc = pyrender.PerspectiveCamera(yfov=np.pi / 3.0, aspectRatio=1.414)
>>> oc = pyrender.OrthographicCamera(xmag=1.0, ymag=1.0)

For more information, see the Khronos group’s documentation here:

When you add cameras to the scene, make sure that you’re using OpenGL camera coordinates to specify their pose. See the illustration below for details. Basically, the camera z-axis points away from the scene, the x-axis points right in image space, and the y-axis points up in image space.