addOrmTextureToPbrMaterial#
Fully qualified name: usdex::core::addOrmTextureToPbrMaterial
- bool usdex::core::addOrmTextureToPbrMaterial(
- pxr::UsdShadeMaterial &material,
- const pxr::SdfAssetPath &texturePath,
Adds an ORM (occlusion, roughness, metallic) texture to an OpenPBR material.
An ORM texture is a normal 3-channel image asset, where the R channel represents occlusion, the G channel represents roughness, and the B channel represents metallic/metalness. The occlusion channel is not used by the OpenPBR definition.
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
SdfAssetPathto the texture file
- Returns:
Whether or not the texture was added to the material