Team Ai
Apppublic

OpenMotionLab/MotionGPT

sourceHugging Facemitupdated 1y agoView on Hugging Face
118likes
cameras.rst27 linesDownload Raw Back to examples
1.. _camera_guide:2 3Creating Cameras4================5 6Pyrender supports three camera types -- :class:`.PerspectiveCamera` and7:class:`.IntrinsicsCamera` types,8which render scenes as a human would see them, and9:class:`.OrthographicCamera` types, which preserve distances between points.10 11Creating cameras is easy -- just specify their basic attributes:12 13>>> pc = pyrender.PerspectiveCamera(yfov=np.pi / 3.0, aspectRatio=1.414)14>>> oc = pyrender.OrthographicCamera(xmag=1.0, ymag=1.0)15 16For more information, see the Khronos group's documentation here_:17 18.. _here: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#projection-matrices19 20When you add cameras to the scene, make sure that you're using OpenGL camera21coordinates to specify their pose. See the illustration below for details.22Basically, the camera z-axis points away from the scene, the x-axis points23right in image space, and the y-axis points up in image space.24 25.. image:: /_static/camera_coords.png26 27