Pyrender API Documentation

Constants

Classes

RenderFlags Flags for rendering in the scene.
TextAlign Text alignment options for captions.
GLTF Options for GL objects.

Cameras

Classes

Camera([znear, zfar, name]) Abstract base class for all cameras.
PerspectiveCamera(yfov[, znear, zfar, …]) A perspective camera for perspective projection.
OrthographicCamera(xmag, ymag[, znear, …]) A perspective camera for perspective projection.
IntrinsicsCamera(fx, fy, cx, cy[, znear, …]) A perspective camera with custom intrinsics.

Lighting

Classes

Light([color, intensity, name]) Base class for all light objects.
DirectionalLight([color, intensity, name]) Directional lights are light sources that act as though they are infinitely far away and emit light in the direction of the local -z axis.
SpotLight([color, intensity, range, …]) Spot lights emit light in a cone in the direction of the local -z axis.
PointLight([color, intensity, range, name]) Point lights emit light in all directions from their position in space; rotation and scale are ignored except for their effect on the inherited node position.

Objects

Classes

IntrinsicsCamera(fx, fy, cx, cy[, znear, …]) A perspective camera with custom intrinsics.
Sampler([name, magFilter, minFilter, wrapS, …]) Texture sampler properties for filtering and wrapping modes.
Texture([name, sampler, source, …]) A texture and its sampler.
Material([name, normalTexture, …]) Base for standard glTF 2.0 materials.
MetallicRoughnessMaterial([name, …]) A material based on the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.
Primitive(positions[, normals, tangents, …]) A primitive object which can be rendered.
Mesh(primitives[, name, weights, is_visible]) A set of primitives to be rendered.

Scenes

Classes

IntrinsicsCamera(fx, fy, cx, cy[, znear, …]) A perspective camera with custom intrinsics.
Node([name, camera, children, skin, matrix, …]) A node in the node hierarchy.
Scene([nodes, bg_color, ambient_light, name]) A hierarchical scene graph.

On-Screen Viewer

Classes

Viewer(scene[, viewport_size, render_flags, …]) An interactive viewer for 3D scenes.

Off-Screen Rendering

Classes

OffscreenRenderer(viewport_width, …[, …]) A wrapper for offscreen rendering.