compas_threejs.materials.physical_material.PhysicalMaterial
¤
PhysicalMaterial(
color: Color = white(),
metalness: float = 0,
roughness: float = 1,
emissive: Color = black(),
emissive_intensity: float = 0,
flat_shading: bool = False,
wireframe: bool = False,
anisotropy: float = 0.0,
anisotropy_rotation: float = 0.0,
attenuation_color: Color = white(),
attenuation_distance: float | None = None,
clearcoat: float = 0.0,
clearcot_roughness: float = 0.0,
dispersion: float = 0.0,
ior: float = 1.5,
iridescence: float = 0.0,
iridescenceior: float = 1.3,
iridescence_thickness_range: list[float] = [100, 400],
reflectivity: float = 0.5,
sheen: float = 0,
sheen_color: Color = black(),
sheen_roughness: float = 1.0,
specular_color: Color = white(),
specular_intensity: float = 1.0,
thickness: float = 0.0,
transmission: float = 0.0,
**kwargs,
)
Attributes¤
anisotropy_rotation
property
writable
¤
anisotropy_rotation: float
The rotation of the anisotropy in tangent, bitangent space, measured in radians counter-clockwise from the tangent.
attenuation_color
property
writable
¤
The color that white light turns into due to absorption when reaching the attenuation distance.
attenuation_distance
property
writable
¤
attenuation_distance: float | None
Average distance light travels before attenuation.
None leaves the distance unbounded, matching the Three.js default.
Explicit values are expressed in world-space units and must be finite
and greater than zero.
clearcoat
property
writable
¤
clearcoat: float
Represents the intensity of the clear coat layer, from 0.0 to 1.0.
clearcot_roughness
property
writable
¤
clearcot_roughness: float
Roughness of the clear coat layer, from 0.0 to 1.0.
dispersion
property
writable
¤
dispersion: float
Defines the strength of the angular separation of colors (chromatic aberration) transmitting through a relatively clear volume. Any value zero or larger is valid; the typical range of realistic values is [0, 1].
ior
property
writable
¤
ior: float
Index-of-refraction for non-metallic materials, from 1.0 to 2.333.
iridescence
property
writable
¤
iridescence: float
The intensity of the iridescence layer, simulating RGB color shift based on the angle between the surface and the viewer, from 0.0 to 1.0.
iridescence_ior
property
writable
¤
iridescence_ior: float
Strength of the iridescence RGB color shift effect, represented by an index-of-refraction. Between 1.0 to 2.333.
iridescence_thickness_range
property
writable
¤
iridescence_thickness_range: list
Array of exactly 2 elements specifying the iridescence layer's minimum and maximum thickness. Iridescence layer thickness has an effect equivalent to the one thickness has on IOR. Default is [100, 400].
reflectivity
property
writable
¤
reflectivity: float
Degree of reflectivity, from 0.0 to 1.0. Default is 0.5, which corresponds to an index-of-refraction of 1.5.
This models the reflectivity of non-metallic materials. It has no effect when metalness is 1.0.
sheen_roughness
property
writable
¤
sheen_roughness: float
Roughness of the sheen layer, from 0.0 to 1.0. Default is 1.
specular_color
property
writable
¤
Tints the specular reflection at normal incidence for non-metals only. Default is (1, 1, 1).
specular_intensity
property
writable
¤
specular_intensity: float
A float that scales the amount of specular reflection for non-metals only. When set to zero, the model is effectively Lambertian. From 0.0 to 1.0. Default is 1.
thickness
property
writable
¤
thickness: float
The thickness of the volume beneath the surface, given in the coordinate space of the mesh. If the value is 0, the material is thin-walled. Otherwise, the material is a volume boundary. Default is 0.
transmission
property
writable
¤
transmission: float
Degree of transmission (or optical transparency), from 0.0 to 1.0.
Thin, transparent or semitransparent plastic or glass materials remain largely reflective, even if they are fully transmissive. The transmission property can be used to model these materials.
When transmission is non-zero, opacity should be set to 1.
Default is 0.