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 in the range of 0 to 1 that reaches the actor when not directed at the light source emitted from the viewer.

Examples

>>> import pyvista as pv
>>> prop = pv.Property()
>>> prop.ambient = 0.2
>>> prop.ambient
0.2

Visualize default ambient light.

>>> prop.ambient = 0.0
>>> prop.plot()
https://d33wubrfki0l68.cloudfront.net/7e2fffe836c3935de62328336c278d550c30dc8d/fc990/_images/pyvista-property-ambient-1_00_00.png

Visualize ambient at 0.5.

>>> prop.ambient = 0.5
>>> prop.plot()
https://d33wubrfki0l68.cloudfront.net/0dc2b5178b36295be31ef16434b616c8fa83fda1/9d7fc/_images/pyvista-property-ambient-1_01_00.png

Visualize ambient at 1.0.

>>> prop.ambient = 1.0
>>> prop.plot()
https://d33wubrfki0l68.cloudfront.net/0a0eb4ef4a1d3fe83d10809b505d4fa6e94f07d8/d895e/_images/pyvista-property-ambient-1_02_00.png