fiftyone.core.threed.material_3d#

Material definition for 3D visualization.

Copyright 2017-2025, Voxel51, Inc.

Classes:

Material3D([opacity])

Base class for 3D materials.

PointCloudMaterial([shading_mode, ...])

Represents a point cloud material.

MeshMaterial([wireframe, opacity])

Represents a mesh material.

MeshBasicMaterial([color, wireframe, opacity])

Represents a basic mesh material.

MeshStandardMaterial([color, ...])

Represents a standard mesh material.

MeshLambertMaterial([color, emissive_color, ...])

Represents a Lambert mesh material.

MeshPhongMaterial([shininess, ...])

Represents a Phong mesh material.

MeshDepthMaterial([wireframe, opacity])

Represents a depth mesh material.

class fiftyone.core.threed.material_3d.Material3D(opacity: float = 1.0)#

Bases: BaseValidatedDataClass

Base class for 3D materials.

Parameters:

opacity (1.0) – the opacity of the material, in the range [0, 1]

Attributes:

Methods:

property opacity: float#
as_dict()#
class fiftyone.core.threed.material_3d.PointCloudMaterial(shading_mode: Literal['height', 'intensity', 'rgb', 'custom'] = 'height', custom_color: str = '#ffffff', point_size: float = 1.0, attenuate_by_distance: bool = False, opacity: float = 1.0)#

Bases: Material3D

Represents a point cloud material.

Parameters:
  • shading_mode ("height") – the shading mode to use. Supported values are “height”, “intensity”, “rgb”, and “custom”

  • custom_color ("#ffffff") – a custom color to use for the point cloud. This is only used when shading_mode is “custom”

  • point_size (1.0) – the size of the points in the point cloud

  • attenuate_by_distance (False) – whether to attenuate the point size based on distance from the camera

  • opacity (1.0) – the opacity of the material, in the range [0, 1]

Attributes:

Methods:

property shading_mode: Literal['height', 'intensity', 'rgb', 'custom']#
property custom_color: str#
property point_size: float#
property attenuate_by_distance: bool#
as_dict()#
property opacity: float#
class fiftyone.core.threed.material_3d.MeshMaterial(wireframe: bool = False, opacity: float = 1.0)#

Bases: Material3D

Represents a mesh material.

Parameters:
  • wireframe (False) – whether to render the mesh as a wireframe

  • opacity (1.0) – the opacity of the material, in the range [0, 1]

Attributes:

Methods:

property wireframe: bool#
as_dict()#
property opacity: float#
class fiftyone.core.threed.material_3d.MeshBasicMaterial(color: str = '#808080', wireframe: bool = False, opacity: float = 1.0)#

Bases: MeshMaterial

Represents a basic mesh material.

This material is not affected by lights, and is rendered as a solid color.

Parameters:
  • color ("#808080") – the color of the material

  • wireframe (False) – whether to render the mesh as a wireframe

  • opacity (1.0) – the opacity of the material, in the range [0, 1]

Attributes:

Methods:

property color: str#
as_dict()#
property opacity: float#
property wireframe: bool#
class fiftyone.core.threed.material_3d.MeshStandardMaterial(color: str = '#808080', emissive_color: str = '#000000', emissive_intensity: float = 0.0, metalness: float = 0.0, roughness: float = 1.0, wireframe: bool = False, opacity: float = 1.0)#

Bases: MeshMaterial

Represents a standard mesh material.

This material is a standard physically-based rendering (PBR) material. This material is ideal for most use cases.

Parameters:
  • color ("#808080") – the color of the material

  • emissive_color ("#000000") – the emissive color of the material. This is the color emitted by the material itself independent of the light

  • emissive_intensity (0.0) – the intensity of the emissive color

  • metalness (0.0) – the metalness of the material

  • roughness (1.0) – the roughness of the material

  • wireframe (False) – whether to render the mesh as a wireframe

  • opacity (1.0) – the opacity of the material, in the range [0, 1]

Attributes:

Methods:

property color: str#
property opacity: float#
property wireframe: bool#
property emissive_color: str#
property emissive_intensity: float#
property metalness: float#
property roughness: float#
as_dict()#
class fiftyone.core.threed.material_3d.MeshLambertMaterial(color: str = '#808080', emissive_color: str = '#000000', emissive_intensity: float = 0.0, reflectivity: float = 1.0, refraction_ratio: float = 0.98, wireframe: bool = False, opacity: float = 1.0)#

Bases: MeshMaterial

Represents a Lambert mesh material.

This material only takes into account diffuse reflections, and ignores specular reflection. This is ideal for materials that reflect light evenly without a glossy or shiny appearance, such as unpolished surfaces.

Parameters:
  • color ("#808080") – the color of the material

  • emissive_color ("#000000") – the emissive color of the material. This is the color emitted by the material itself independent of the light

  • emissive_intensity (0.0) – the intensity of the emissive color

  • reflectivity (1.0) – the reflectivity of the material

  • refraction_ratio (0.98) – the refraction ratio (IOR) of the material

  • wireframe (False) – whether to render the mesh as a wireframe

  • opacity (1.0) – the opacity of the material, in the range [0, 1]

Attributes:

Methods:

property opacity: float#
property wireframe: bool#
property color: str#
property emissive_color: str#
property emissive_intensity: float#
property reflectivity: float#
property refraction_ratio: float#
as_dict()#
class fiftyone.core.threed.material_3d.MeshPhongMaterial(shininess: float = 30.0, specular_color: str = '#111111', color: str = '#808080', emissive_color: str = '#000000', emissive_intensity: float = 0.0, reflectivity: float = 1.0, refraction_ratio: float = 0.98, wireframe: bool = False, opacity: float = 1.0)#

Bases: MeshLambertMaterial

Represents a Phong mesh material.

This material takes into account specular reflection. This is ideal for materials that reflect light with a glossy or shiny appearance, such as polished surfaces.

Parameters:
  • shininess (30.0) – the shininess of the material

  • specular_color ("#111111") – the specular color of the material

  • color ("#808080") – the color of the material

  • emissive_color ("#000000") – the emissive color of the material. This is the color emitted by the material itself independent of the light

  • emissive_intensity (0.0) – the intensity of the emissive color

  • reflectivity (1.0) – the reflectivity of the material

  • refraction_ratio (0.98) – the refraction ratio (IOR) of the material

  • wireframe (False) – whether to render the mesh as a wireframe

  • opacity (1.0) – the opacity of the material, in the range [0, 1]

Attributes:

Methods:

property color: str#
property emissive_color: str#
property emissive_intensity: float#
property opacity: float#
property reflectivity: float#
property refraction_ratio: float#
property wireframe: bool#
property shininess: float#
property specular_color: str#
as_dict()#
class fiftyone.core.threed.material_3d.MeshDepthMaterial(wireframe: bool = False, opacity: float = 1.0)#

Bases: MeshMaterial

Represents a depth mesh material.

This material is used for drawing geometry by depth, where depth is based off of the camera near and far plane. White is nearest, black is farthest.

Parameters:
  • wireframe (False) – whether to render the mesh as a wireframe

  • opacity (1.0) – the opacity of the material, in the range [0, 1]

Methods:

Attributes:

as_dict()#
property opacity: float#
property wireframe: bool#