pyvista.Property.roughness#

property Property.roughness: float[source]#

Return or set roughness.

Default pyvista.plotting.themes._LightingConfig.roughness.

This requires that the interpolation be set to 'Physically based rendering'.

Property has range [0.0, 1.0]. A value of 0 is glossy and a value of 1 is rough.

Examples

Get the default roughness value.

>>> import pyvista as pv
>>> prop = pv.Property()
>>> prop.roughness
0.5

Visualize default roughness with metallic of 0.5 and physically-based rendering.

>>> prop.interpolation = 'pbr'
>>> prop.metallic = 0.5
>>> prop.plot()
../../../_images/pyvista-Property-roughness-1_00_00.png

Visualize roughness at 0.1.

>>> prop.roughness = 0.0
>>> prop.plot()
../../../_images/pyvista-Property-roughness-1_01_00.png

Visualize roughness at 1.0.

>>> prop.roughness = 1.0
>>> prop.plot()
../../../_images/pyvista-Property-roughness-1_02_00.png