fiftyone.core.threed.material_3d¶
Material definition for 3D visualization.
Classes:
|
Base class for 3D materials. |
|
Represents a point cloud material. |
|
Represents a mesh material. |
|
Represents a basic mesh material. |
|
Represents a standard mesh material. |
|
Represents a Lambert mesh material. |
|
Represents a Phong mesh material. |
|
Represents a depth mesh material. |
-
class
fiftyone.core.threed.material_3d.
Material3D
(opacity: float = 1.0)¶ Bases:
fiftyone.core.threed.validators.BaseValidatedDataClass
Base class for 3D materials.
- Parameters
opacity (1.0) – the opacity of the material, in the range
[0, 1]
Attributes:
Methods:
as_dict
()-
property
opacity
¶
-
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:
fiftyone.core.threed.material_3d.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:
as_dict
()-
property
shading_mode
¶
-
property
custom_color
¶
-
property
point_size
¶
-
property
attenuate_by_distance
¶
-
as_dict
()¶
-
property
opacity
¶
-
class
fiftyone.core.threed.material_3d.
MeshMaterial
(wireframe: bool = False, opacity: float = 1.0)¶ Bases:
fiftyone.core.threed.material_3d.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:
as_dict
()-
property
wireframe
¶
-
as_dict
()¶
-
property
opacity
¶
-
class
fiftyone.core.threed.material_3d.
MeshBasicMaterial
(color: str = '#808080', wireframe: bool = False, opacity: float = 1.0)¶ Bases:
fiftyone.core.threed.material_3d.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:
as_dict
()-
property
color
¶
-
as_dict
()¶
-
property
opacity
¶
-
property
wireframe
¶
-
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:
fiftyone.core.threed.material_3d.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:
as_dict
()-
property
color
¶
-
property
opacity
¶
-
property
wireframe
¶
-
property
emissive_color
¶
-
property
emissive_intensity
¶
-
property
metalness
¶
-
property
roughness
¶
-
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:
fiftyone.core.threed.material_3d.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:
as_dict
()-
property
opacity
¶
-
property
wireframe
¶
-
property
color
¶
-
property
emissive_color
¶
-
property
emissive_intensity
¶
-
property
reflectivity
¶
-
property
refraction_ratio
¶
-
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:
fiftyone.core.threed.material_3d.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:
as_dict
()-
property
color
¶
-
property
emissive_color
¶
-
property
emissive_intensity
¶
-
property
opacity
¶
-
property
reflectivity
¶
-
property
refraction_ratio
¶
-
property
wireframe
¶
-
property
shininess
¶
-
property
specular_color
¶
-
as_dict
()¶
-
class
fiftyone.core.threed.material_3d.
MeshDepthMaterial
(wireframe: bool = False, opacity: float = 1.0)¶ Bases:
fiftyone.core.threed.material_3d.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:
as_dict
()Attributes:
-
as_dict
()¶
-
property
opacity
¶
-
property
wireframe
¶