Usd Material and Usd Shader Utilities
Utility functions for creating, editing, and querying UsdShadeMaterial and UsdShadeShader objects.
Enumerations
- omni::connect::core::ColorSpace
Texture color space (encoding) types.
Functions
- bool omni::connect::core::addDiffuseTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)
Adds a diffuse texture to the PBR material.
- bool omni::connect::core::addMetallicTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)
Adds a metallic texture to the PBR material.
- bool omni::connect::core::addNormalTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)
Adds a normal texture to the PBR material.
- bool omni::connect::core::addOpacityTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)
Adds an opacity texture to the PBR material.
- bool omni::connect::core::addOrmTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)
Adds an ORM (occlusion, roughness, metallic) texture to the PBR material.
- bool omni::connect::core::addRoughnessTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)
Adds a roughness texture to the PBR material.
- void omni::connect::core::bindMaterial(pxr::UsdPrim prim, const pxr::UsdShadeMaterial &material)
Binds a UsdShadeMaterial to a UsdPrim.
- pxr::UsdShadeShader omni::connect::core::computeEffectiveMdlSurfaceShader(const pxr::UsdShadeMaterial &material)
Get the effective surface Shader of a Material for the MDL render context.
- pxr::UsdShadeShader omni::connect::core::computeEffectivePreviewSurfaceShader(const pxr::UsdShadeMaterial &material)
Get the effective surface Shader of a Material for the universal render context.
- pxr::UsdShadeMaterial omni::connect::core::createMaterial(pxr::UsdPrim parent, const std::string &name)
Create a UsdShadeMaterial as a child of the UsdPrim argument.
- pxr::UsdShadeShader omni::connect::core::createMdlShader(pxr::UsdShadeMaterial &material, const std::string &name, const pxr::SdfAssetPath &mdlPath, const pxr::TfToken &module, bool connectMaterialOutputs=true)
Create a UsdShadeShader as a child of the UsdShadeMaterial argument with the specified MDL.
- pxr::UsdShadeInput omni::connect::core::createMdlShaderInput(pxr::UsdShadeMaterial &material, const pxr::TfToken &name, const pxr::VtValue &value, const pxr::SdfValueTypeName &typeName, carb::cpp::optional< const ColorSpace > colorSpace=carb::cpp::nullopt)
Create an MDL shader input.
- pxr::UsdShadeMaterial omni::connect::core::defineOmniGlassMaterial(pxr::UsdPrim parent, const std::string &name, const pxr::GfVec3f &color, const float indexOfRefraction=1.491f)
Defines an OmniGlass UsdShadeMaterial interface that drives both an RTX render context and a UsdPreviewSurface context.
- pxr::UsdShadeMaterial omni::connect::core::defineOmniGlassMaterial(pxr::UsdStagePtr stage, const pxr::SdfPath &path, const pxr::GfVec3f &color, const float indexOfRefraction=1.491f)
Defines an OmniGlass UsdShadeMaterial interface that drives both an RTX render context and a UsdPreviewSurface context.
- pxr::UsdShadeMaterial omni::connect::core::defineOmniPbrMaterial(pxr::UsdStagePtr stage, const pxr::SdfPath &path, const pxr::GfVec3f &color, const float opacity=1.0f, const float roughness=0.5f, const float metallic=0.0f)
Defines an OmniPBR UsdShadeMaterial interface that drives both an RTX render context and a UsdPreviewSurface context.
- pxr::UsdShadeMaterial omni::connect::core::defineOmniPbrMaterial(pxr::UsdPrim parent, const std::string &name, const pxr::GfVec3f &color, const float opacity=1.0f, const float roughness=0.5f, const float metallic=0.0f)
Defines an OmniPBR UsdShadeMaterial interface that drives both an RTX render context and a UsdPreviewSurface context.
- pxr::GfVec3f omni::connect::core::linearToSrgb(const pxr::GfVec3f &color)
Translate a linear color value to sRGB color space.
- pxr::GfVec3f omni::connect::core::sRgbToLinear(const pxr::GfVec3f &color)
Translate an sRGB color value to linear color space.