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(x)

Convert a Trimesh 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.

MeshToonMaterial([emissive, gradient_map, ...])

A material implementing toon shading.

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([size, size_space, ...])

Point default material.

PointsGaussianBlobMaterial([size, ...])

A material to render points as Gaussian blobs.

PointsMarkerMaterial(*[, marker, ...])

A material to render points as markers.

PointsSpriteMaterial(*[, sprite])

A material to render points as sprite images.

LineMaterial([thickness, thickness_space, ...])

Basic line material.

LineSegmentMaterial([thickness, ...])

Line segment material.

LineArrowMaterial([thickness, ...])

Arrow (vector) line material.

LineThinMaterial([thickness, ...])

Thin line material.

LineThinSegmentMaterial([thickness, ...])

Thin line segment material.

LineDebugMaterial([thickness, ...])

Line debug material.

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

Rasterized image material.

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

Basic volume material.

VolumeIsoMaterial([threshold, step_size, ...])

A material rendering a volume using isosurface rendering.

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.

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

A material rendering a volume using MinIP rendering.

BackgroundMaterial(*colors, **kwargs)

Solid/Gradient background color.

BackgroundImageMaterial([map])

Image/Skybox background.

BackgroundSkyboxMaterial([map])

Skybox background.

GridMaterial(*[, major_step, minor_step, ...])

A Cartesian grid.

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

Basic text material.