Property.roughness#
- property Property.roughness: float[source]#
Return or set roughness.
Default
pyvista.plotting.themes._LightingConfig.roughness.This requires that the
interpolationbe 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#
Download Python source code | Download Jupyter notebook
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()
Visualize roughness at 0.1.
>>> prop.roughness = 0.0
>>> prop.plot()
Visualize roughness at 1.0.
>>> prop.roughness = 1.0
>>> prop.plot()