Material#

struct Material#

OBJ-style material definition with PBR properties.

Direct representation of .obj style material with ambient, diffuse, specular components and modern PBR extensions for metallic workflow.

Public Members

std::string name#

Name identifier for the material.

Vec3 Ka#

Ambient color component (RGB).

Vec3 Kd#

Diffuse color component (RGB).

Vec3 Ks#

Specular color component (RGB).

Vec3 emissive#

Emissive color component (RGB).

float Ns = 50.0f#

Specular exponent for shininess calculation.

float metallic = 0.0f#

Metallic factor for PBR rendering (0.0 = dielectric, 1.0 = metallic).

float specular = 0.0f#

Specular reflectance factor.

std::string mapKd = ""#

Diffuse texture map file path.

std::string mapKs = ""#

Specular/shininess texture map file path.

std::string mapBump = ""#

Normal/bump texture map file path.

std::string mapEnv = ""#

Environment/emissive texture map file path.

std::string mapMetallic = ""#

Metallic texture map file path.

bool hasDiffuse = false#

Whether the material has a diffuse texture.

bool hasSpecular = false#

Whether the material has a specular texture.

bool hasMetallic = false#

Whether the material has a metallic texture.

bool hasEmissive = false#

Whether the material has an emissive texture.

bool hasShininess = false#

Whether the material has a shininess texture.