Class: QgsMetalRoughMaterialSettings¶
A PBR metal rough shading material used for rendering.
Warning
This is not considered stable API, and may change in future QGIS releases. It is exposed to the Python bindings as a tech preview only.
Added in version 3.36.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Abstract base class for material settings. |
Abstract Methods
Returns an approximate color representing the blended material color. |
|
Decomposes a base color into the material's color components, and sets the material's color accordingly. |
Methods
Returns the material's anisotropy, as a value between 0 and 1. |
|
Returns the rotation of the material's anisotropy, as a angle in degrees. |
|
Returns the base material color. |
|
Returns the material's clear coat factor, as a value between 0 and 1. |
|
Returns the material's clear coat roughness, as a value between 0 and 1. |
|
Returns the material's emissive color. |
|
Returns the emission factor, which dictates the strength of the emission effect. |
|
Returns the material's metalness, as a value between 0 and 1. |
|
Returns the opacity of the surface |
|
Returns the material's reflectance, as a value between 0 and 1. |
|
Returns the material's roughness, as a value between 0 and 1. |
|
Sets the material's anisotropy, as a value between 0 and 1. |
|
Sets the rotation of the material's anisotropy, as a angle in degrees. |
|
Sets the base material color. |
|
Sets the material's clear coat factor, as a value between 0 and 1. |
|
Sets the material's clear coat roughness, as a value between 0 and 1. |
|
Sets the material's emissive color. |
|
Sets the emission factor, which dictates the strength of the emission effect. |
|
Sets the material's metalness, as a value between 0 and 1. |
|
Sets the opacity of the surface. |
|
Sets the material's reflectance, as a value between 0 and 1. |
|
Sets the material's roughness, as a value between 0 and 1. |
Static Methods
Returns a new instance of QgsMetalRoughMaterialSettings. |
|
Returns |
- class qgis.core.QgsMetalRoughMaterialSettings[source]¶
Bases:
QgsAbstractMaterialSettings- anisotropy(self) float[source]¶
Returns the material’s anisotropy, as a value between 0 and 1.
Anisotropic materials are those with properties which vary in different directions.
See also
See also
Added in version 4.2.
- Return type:
float
- anisotropyRotation(self) float[source]¶
Returns the rotation of the material’s anisotropy, as a angle in degrees.
Anisotropic materials are those with properties which vary in different directions.
See also
See also
Added in version 4.2.
- Return type:
float
- abstract averageColor(self) QColor[source]¶
Returns an approximate color representing the blended material color.
Since this material contains only a single color, this function simply returns
baseColor().See also
Added in version 4.2.
- Return type:
QColor
- clearCoatFactor(self) float[source]¶
Returns the material’s clear coat factor, as a value between 0 and 1.
See also
See also
Added in version 4.2.
- Return type:
float
- clearCoatRoughness(self) float[source]¶
Returns the material’s clear coat roughness, as a value between 0 and 1.
See also
See also
Added in version 4.2.
- Return type:
float
- static create() QgsAbstractMaterialSettings | None[source]¶
Returns a new instance of QgsMetalRoughMaterialSettings.
- Return type:
- emissionColor(self) QColor[source]¶
Returns the material’s emissive color.
See also
Added in version 4.2.
- Return type:
QColor
- emissionFactor(self) float[source]¶
Returns the emission factor, which dictates the strength of the emission effect.
A value of 1.0 indicates that the emission color values should be used directly. Larger values result in more light emission.
See also
See also
Added in version 4.2.
- Return type:
float
- metalness(self) float[source]¶
Returns the material’s metalness, as a value between 0 and 1.
See also
- Return type:
float
- opacity(self) float[source]¶
Returns the opacity of the surface
See also
Added in version 4.2.
- Return type:
float
- reflectance(self) float[source]¶
Returns the material’s reflectance, as a value between 0 and 1.
This controls the specular intensity for non-metals.
See also
Added in version 4.2.
- Return type:
float
- roughness(self) float[source]¶
Returns the material’s roughness, as a value between 0 and 1.
See also
- Return type:
float
- setAnisotropy(self, anisotropy: float)[source]¶
Sets the material’s
anisotropy, as a value between 0 and 1.Anisotropic materials are those with properties which vary in different directions.
See also
See also
Added in version 4.2.
- Parameters:
anisotropy (float)
- setAnisotropyRotation(self, rotation: float)[source]¶
Sets the
rotationof the material’s anisotropy, as a angle in degrees.Anisotropic materials are those with properties which vary in different directions.
See also
See also
Added in version 4.2.
- Parameters:
rotation (float)
- setBaseColor(self, color: QColor | Qt.GlobalColor | int)[source]¶
Sets the base material
color.See also
- Parameters:
color (Union[QColor, Qt.GlobalColor, int])
- setClearCoatFactor(self, factor: float)[source]¶
Sets the material’s clear coat
factor, as a value between 0 and 1.See also
See also
Added in version 4.2.
- Parameters:
factor (float)
- setClearCoatRoughness(self, roughness: float)[source]¶
Sets the material’s clear coat
roughness, as a value between 0 and 1.See also
See also
Added in version 4.2.
- Parameters:
roughness (float)
- abstract setColorsFromBase(self, baseColor: QColor | Qt.GlobalColor | int)[source]¶
Decomposes a base color into the material’s color components, and sets the material’s color accordingly.
Since this material contains only a single color, this function is equivalent to calling setBaseColor(baseColor).
- Parameters:
baseColor (Union[QColor, Qt.GlobalColor, int]) – The color to decompose
See also
Added in version 4.2.
- setEmissionColor(self, color: QColor | Qt.GlobalColor | int)[source]¶
Sets the material’s emissive
color.See also
Added in version 4.2.
- Parameters:
color (Union[QColor, Qt.GlobalColor, int])
- setEmissionFactor(self, factor: float)[source]¶
Sets the emission
factor, which dictates the strength of the emission effect.A value of 1.0 indicates that the emission color values should be used directly. Larger values result in more light emission.
See also
See also
Added in version 4.2.
- Parameters:
factor (float)
- setMetalness(self, metalness: float)[source]¶
Sets the material’s
metalness, as a value between 0 and 1.See also
- Parameters:
metalness (float)
- setOpacity(self, opacity: float)[source]¶
Sets the
opacityof the surface.See also
Added in version 4.2.
- Parameters:
opacity (float)
- setReflectance(self, reflectance: float)[source]¶
Sets the material’s
reflectance, as a value between 0 and 1.This controls the specular intensity for non-metals.
See also
Added in version 4.2.
- Parameters:
reflectance (float)
- setRoughness(self, roughness: float)[source]¶
Sets the material’s
roughness, as a value between 0 and 1.See also
- Parameters:
roughness (float)
- static supportsTechnique(technique: Qgis.MaterialRenderingTechnique) bool[source]¶
Returns
Trueif the specifiedtechniqueis supported by the metal rough material.- Parameters:
technique (Qgis.MaterialRenderingTechnique)
- Return type:
bool