Discover Learn Reference Get OpenPLX Search Contact

Visuals/Materials/SurfaceFeatures

Roughness

trait Roughness:
    .doc: """
Surface roughness attempts to model microscopic irregularities on the surface
causing reflected light to be more diffused. A higher roughness value will result
in wider specular highlights.

If an roughness_map is provided, the sampled values is scaled by the constant roughness value.
Otherwise, the roughness value is used as is.
"""
    roughness is Real: 1.0
    roughness_map is Visuals.Textures.DefaultTexture

    # Propagate outer values to the physical visible light spectrum band
    visible becomes Visuals.Optics.VisibleBand with Visuals.Optics.SurfaceFeatures.Roughness:
        roughness: roughness
        roughness_map: roughness_map

OpenPLX is a work in progress. This draft version will evolve with user feedback and experience. We welcome your input and collaboration.
X