pygfx.materials.VolumeIsoMaterial

class pygfx.materials.VolumeIsoMaterial(threshold: float = 0.5, step_size: float = 1.0, substep_size: float = 0.1, emissive: Color = '#000', shininess: float = 30, **kwargs)

Bases: VolumeRayMaterial

A material rendering a volume using isosurface rendering.

Parameters:
  • threshold (float) – The threshold texture value at which the surface is rendered. The default value is 0.5.

  • step_size (float) – The size of the initial ray marching step for the initial surface finding. Smaller values will result in more accurate surfaces but slower rendering. Default value is 1.0.

  • substep_size (float) – The size of the raymarching step for the refined surface finding. Smaller values will result in more accurate surfaces but slower rendering. Default value is 0.1.

  • emissive (Color) – The emissive color of the surface. I.e. the color that the object emits even when not lit by a light source. This color is added to the final color and unaffected by lighting. The alpha channel is ignored. Default value is (0, 0, 0, 1).

  • shininess (int) – How shiny the specular highlight is; a higher value gives a sharper highlight. Default value is 30.

property threshold: float

The threshold texture value at which the surface is rendered.

property step_size: float

The size of the initial ray marching step for finding the surface.

Smaller values will result in more accurate surfaces but slower rendering.

property substep_size: float

The size of the raymarching step for the refined surface finding.

Smaller values will result in more accurate surfaces but slower rendering.

property emissive

The emissive (light) color of the surface. This color is added to the final color and is unaffected by lighting. The alpha channel of this color is ignored.

property shininess

How shiny the specular highlight is; a higher value gives a sharper highlight. Default is 30.