Skip to main content

Module materials

Module materials 

Source
Expand description

PBR material sets: finds the maps that belong to a model or texture by file name, and builds the texture keys the renderer understands.

Supported naming (the part before the suffix is the shared stem):

  • Unity / HDRP packs: <stem>_AlbedoTransparency.png, _MetallicSmoothness.png (R = metallic, A = smoothness), _Normal.png.
  • Substance / generic: _BaseColor, _Normal (or _NormalGL), _Roughness, _Metallic, _AmbientOcclusion / _AO.

Structs§

PbrSet
Discovered texture maps for one physically based material.

Constants§

ORM_PREFIX
Texture key prefix: a packed occlusion / roughness / metallic texture composed from separate maps.

Functions§

discover
Maps found next to path (a model or any texture of the set).
orm_key
Builds an orm: key. Each part is an asset path; smooth is a Unity MetallicSmoothness map (metal from red, smoothness from alpha) that supplies both metal and roughness.
parse_orm_key
Splits an orm: key back into (ao, rough, metal, smooth).