definePbrMaterial#
Fully qualified name: usdex::core::definePbrMaterial
- pxr::UsdShadeMaterial usdex::core::definePbrMaterial(
- pxr::UsdStagePtr stage,
- const pxr::SdfPath &path,
- const pxr::GfVec3f &color,
- const float opacity = 1.0f,
- const float roughness = 0.3f,
- const float metallic = 0.0f,
Defines an OpenPBR
UsdShadeMaterialinterface that drives both an OpenPBR MaterialX render context and the universal render context.The input parameters reflect a subset of the open_pbr_surface shader definition. Many other inputs are available and can be authored after calling this function.
Note
The
OpenPBRdefinition and texture functions always create a Material Interface- Parameters:
stage – The stage on which to define the Material
path – The absolute prim path at which to define the Material
color – The base color of the Material
opacity – The Opacity Amount to set, 0.0-1.0 range where 1.0 = opaque and 0.0 = invisible
roughness – The Roughness Amount to set, 0.0-1.0 range where 1.0 = flat and 0.0 = glossy
metallic – The Metallic Amount to set, 0.0-1.0 range where 1.0 = max metallic and 0.0 = no metallic
- Returns:
The newly defined
UsdShadeMaterial. Returns an Invalid object on error.