pyvista.Property.ambient

Contents

pyvista.Property.ambient#

property Property.ambient: float[source]#

Return or set ambient.

Default pyvista.plotting.themes._LightingConfig.ambient.

When lighting is enabled, this is the amount of light that reaches the actor when not directed at the light source emitted from the viewer.

Property has range [0.0, 1.0].

Examples

Get the default ambient value and visualize it.

>>> import pyvista as pv
>>> prop = pv.Property()
>>> prop.ambient
0.0
>>> prop.plot()
../../../_images/pyvista-Property-ambient-1_00_00.png

Visualize ambient at 0.25.

>>> prop.ambient = 0.25
>>> prop.plot()
../../../_images/pyvista-Property-ambient-1_01_00.png

Visualize ambient at 0.75.

>>> prop.ambient = 0.75
>>> prop.plot()
../../../_images/pyvista-Property-ambient-1_02_00.png