addMetallicTextureToPbrMaterial#

Fully qualified name: usdex::core::addMetallicTextureToPbrMaterial

bool usdex::core::addMetallicTextureToPbrMaterial(
pxr::UsdShadeMaterial &material,
const pxr::SdfAssetPath &texturePath,
)#

Adds a single channel metallic texture to an OpenPBR material.

It is expected that the material was created by definePbrMaterial()

The texture will be sampled using texture coordinates from the default UV set (generally named primvars:st).

Parameters:
  • material – The material prim

  • texturePath – The SdfAssetPath to the texture file

Returns:

Whether or not the texture was added to the material