QcMaterialParams Struct
The surface of one procedural texture for its material maps (decision E-908), before it is painted per texel by QcMaterialSynthesizer. More...
| Header: | #include <clientcore/materials/QcMaterialParams.h> |
Public Types
Public Variables
| float | bump |
| float | emission |
| float | emissionTexels |
| std::optional<QcMaterialParams::Inclusion> | inclusion |
| QcMaterialParams::Metal | metal |
| float | porosity |
| int | reflectance |
| float | smoothness |
Static Public Members
| QcMaterialParams | flat() |
| std::optional<QcMaterialParams::Metal> | metalFromName(const QString &name) |
| QcMaterialParams | withOverrides(QcMaterialParams base, const QJsonObject &material) |
Detailed Description
Values follow the labPBR conventions of the reference game's shader packs: perceptual smoothness 0..1, reflectance at normal incidence (F0) as a code 0..229 for dielectrics (F0 = code / 255) or a metal code 230..237 (QcMaterialParams::Metal), 255 for a metal coloured by the texture itself, porosity 0..1 and emission 0..1.
Member Type Documentation
enum class QcMaterialParams::Metal
The labPBR codes of the hardcoded metals (green channel of the specular map).
| Constant | Value | Description |
|---|---|---|
QcMaterialParams::Metal::None | 0 | A dielectric, F0 from reflectance |
QcMaterialParams::Metal::Iron | 230 | Iron |
QcMaterialParams::Metal::Gold | 231 | Gold |
QcMaterialParams::Metal::Aluminium | 232 | Aluminium |
QcMaterialParams::Metal::Chrome | 233 | Chrome |
QcMaterialParams::Metal::Copper | 234 | Copper |
QcMaterialParams::Metal::Lead | 235 | Lead |
QcMaterialParams::Metal::Platinum | 236 | Platinum |
QcMaterialParams::Metal::Silver | 237 | Silver |
QcMaterialParams::Metal::Albedo | 255 | A metal coloured by the texture itself |
Member Function Documentation
[static] QcMaterialParams QcMaterialParams::flat()
Returns the flat material of textures without maps: smooth 0, F0 0.04, no relief, no light.
[static] std::optional<QcMaterialParams::Metal> QcMaterialParams::metalFromName(const QString &name)
Returns the metal called name ("iron", "gold", …; "albedo"), unset for unknown names.
[static] QcMaterialParams QcMaterialParams::withOverrides(QcMaterialParams base, const QJsonObject &material)
Returns base with the fields of a "material" object of a texture definition or pack spec, material (docs/Texturpakete.md): smoothness, reflectance, metal, bump, porosity, emission, emissionTexels; unknown or out-of-range values keep the base value.
Member Variable Documentation
float QcMaterialParams::bump
Strength of the normals from the texture's brightness (0: flat).
float QcMaterialParams::emission
Light of its own: 0 none; else the share of the brightest texels that glow (emissionTexels) with this strength.
float QcMaterialParams::emissionTexels
Share (0..1) of the brightest texels that glow when emission > 0.
std::optional<QcMaterialParams::Inclusion> QcMaterialParams::inclusion
What the texels of the secondary colour get; unset: the same as the rest.
QcMaterialParams::Metal QcMaterialParams::metal
Metal code; None for a dielectric.
float QcMaterialParams::porosity
How much water the surface takes in (darker and smoother when wet).
int QcMaterialParams::reflectance
F0 * 255 of a dielectric (10: 0.04, most stone and wood); unused for a metal.
float QcMaterialParams::smoothness
Perceptual smoothness (0..1).