blender-pbr-materials

Installation
SKILL.md

PBR Materials

The execution model is in blender-core. Measured values are in references/pbr-values.md.

Fast paths

  • Texture set → material: scripts/build_pbr_material.py -- --name M_Crate --textures //tex/crate --objects SM_Crate. It detects maps by filename (Poly Haven, ambientCG, Substance, UE suffixes), sets color spaces, splits ORM, flips DirectX normals, and routes AO to glTF.
  • Solid physically-plausible material: --preset gold|iron|plastic|rubber|wood|glass|skin|... with an optional --color R G B (sRGB).

The rules (violations are what make renders look "CG")

  1. Metallic is binary: 0 (dielectric) or 1 (raw metal). Use in-between values only on transition pixels (dust or rust edges on metal). Painted metal counts as dielectric.
  2. Base color = albedo with no lighting: no baked shadows/AO/highlights. Dielectric range is sRGB ~30–240 (linear 0.012–0.87): charcoal ≈ 50, fresh snow ≈ 240. Metals: base color = F0 reflectance, sRGB 180–255, never dark.
  3. Roughness carries the realism. Break it up with grunge, smudges and wear. A constant roughness value looks fake; vary it ±0.1–0.2 across a surface.
  4. Color spaces: Base Color and Emission use sRGB. Roughness, Metallic, Normal, AO, Height, Opacity and ORM use Non-Color. A wrong color space is the #1 bug (washed-out normals, wrong roughness).
  5. Specular: leave IOR 1.5 and Specular IOR Level 0.5 for almost all dielectrics. Change IOR only for known materials (water 1.33, glass 1.5, diamond 2.42).
  6. Normal maps: Blender, glTF, Unity and Roblox use OpenGL (Y+). Unreal and Substance's DirectX preset use DirectX (Y-), so flip G when converting. The bake and the target must use the same tangent basis (MikkTSpace) and the same triangulation.
  7. AO: the Principled BSDF has no AO input. For engines, ship AO in the ORM red channel. For Cycles renders, don't multiply AO into base color, because the renderer computes occlusion.

Principled BSDF (5.2) quick map

Base Color, Metallic, Roughness, IOR, Alpha, Normal, Thin Wall (5.2: leaves/paper/fabric sheets without volume), Subsurface Weight/Radius/Scale (skin, wax; Scale in meters ≈ 0.005–0.02 for skin), Specular IOR Level, Specular Tint, Anisotropic, Transmission Weight (glass/liquids), Coat Weight/Roughness/Normal (car paint, varnish), Sheen Weight (cloth, velvet), Emission Color/Strength (strength in W/m²-ish units; 1–10 for screens, 50+ for bulbs), Thin Film Thickness/IOR (soap, oil, coated lenses), Diffuse Roughness.

Installs
1
GitHub Stars
9
First Seen
1 day ago