pygfx.materials

Containers for Material data.

Materials define how a WorldObject is rendered. Many objects support multiple different materials, e.g. the materials that can be applied to a Mesh object mostly determine how the object is affected by lighs. Further, the materials have properties to influence the rendering, like colors, line thickness, colormaps, the strength of specular reflections, etc.

Material(*[, opacity, clipping_planes, ...])

Material base class.

material_from_trimesh(material)

Convert a Trimesh material object into a pygfx material.

MeshAbstractMaterial([color, color_mode, ...])

Abstract mesh material.

MeshBasicMaterial([env_map, wireframe, ...])

Basic mesh material.

MeshPhongMaterial([shininess, emissive, ...])

Phong mesh material.

MeshNormalMaterial([color, color_mode, map, ...])

Color from Mesh normals.

MeshNormalLinesMaterial([line_length])

Render surface normals as lines.

MeshSliceMaterial([plane, thickness])

Display a mesh slice.

MeshStandardMaterial([emissive, metalness, ...])

PBR shaded material.

PointsMaterial([color, size, color_mode, ...])

Point default material.

GaussianPointsMaterial([color, size, ...])

A material for points, renders Gaussian blobs with a standard deviation of 1/6 of the size.

LineMaterial([color, thickness, color_mode, ...])

Basic line material.

LineThinMaterial([color, thickness, ...])

Thin line material.

LineThinSegmentMaterial([color, thickness, ...])

Thin line segment material.

LineSegmentMaterial([color, thickness, ...])

Line segment material.

LineArrowMaterial([color, thickness, ...])

Arrow (vector) line material.

ImageBasicMaterial([clim, map, ...])

Rasterized image material.

VolumeBasicMaterial([clim, map, ...])

Basic volume material.

VolumeSliceMaterial([plane])

A material for rendering a slice through a 3D texture at the surface of a mesh.

VolumeRayMaterial([clim, map, ...])

A material for rendering volumes using raycasting.

VolumeMipMaterial([clim, map, ...])

A material rendering a volume using MIP rendering.

BackgroundMaterial(*colors, **kwargs)

Solid/Gradient background color.

BackgroundImageMaterial([map])

Image/Skybox background.

BackgroundSkyboxMaterial([map])

Skybox background.

TextMaterial([color, outline_color, ...])

Basic text material.