Home

Awesome

Pyrender

Build Status Documentation Status Coverage Status PyPI version Downloads

Pyrender is a pure Python (2.7, 3.4, 3.5, 3.6) library for physically-based rendering and visualization. It is designed to meet the glTF 2.0 specification from Khronos.

Pyrender is lightweight, easy to install, and simple to use. It comes packaged with both an intuitive scene viewer and a headache-free offscreen renderer with support for GPU-accelerated rendering on headless servers, which makes it perfect for machine learning applications.

Extensive documentation, including a quickstart guide, is provided here.

For a minimal working example of GPU-accelerated offscreen rendering using EGL, check out the EGL Google CoLab Notebook.

<p align="center"> <img width="48%" src="https://github.com/mmatl/pyrender/blob/master/docs/source/_static/rotation.gif?raw=true" alt="GIF of Viewer"/> <img width="48%" src="https://github.com/mmatl/pyrender/blob/master/docs/source/_static/damaged_helmet.png?raw=true" alt="Damaged Helmet"/> </p>

Installation

You can install pyrender directly from pip.

pip install pyrender

Features

Despite being lightweight, pyrender has lots of features, including:

Sample Usage

For sample usage, check out the quickstart guide or one of the Google CoLab Notebooks:

Viewer Keyboard and Mouse Controls

When using the viewer, the basic controls for moving about the scene are as follows:

The available keyboard commands are as follows:

As a note, displaying shadows significantly slows down rendering, so if you're experiencing low framerates, just kill shadows or reduce the number of lights in your scene.