Functions#

pxr::UsdLuxDomeLight usdex::core::defineDomeLight(pxr::UsdPrim parent, const std::string &name, float intensity=1.0f, std::optional< std::string_view > texturePath=std::nullopt, const pxr::TfToken &textureFormat=pxr::UsdLuxTokens->automatic)

Creates a dome light with an optional texture.

pxr::UsdLuxDomeLight usdex::core::defineDomeLight(pxr::UsdStagePtr stage, const pxr::SdfPath &path, float intensity=1.0f, std::optional< std::string_view > texturePath=std::nullopt, const pxr::TfToken &textureFormat=pxr::UsdLuxTokens->automatic)

Creates a dome light with an optional texture.

pxr::UsdGeomPoints usdex::core::definePointCloud(pxr::UsdStagePtr stage, const pxr::SdfPath &path, const pxr::VtVec3fArray &points, std::optional< const pxr::VtInt64Array > ids=std::nullopt, std::optional< const FloatPrimvarData > widths=std::nullopt, std::optional< const Vec3fPrimvarData > normals=std::nullopt, std::optional< const Vec3fPrimvarData > displayColor=std::nullopt, std::optional< const FloatPrimvarData > displayOpacity=std::nullopt)

Defines a UsdGeomPoints prim on the stage.

pxr::UsdGeomPoints usdex::core::definePointCloud(pxr::UsdPrim parent, const std::string &name, const pxr::VtVec3fArray &points, std::optional< const pxr::VtInt64Array > ids=std::nullopt, std::optional< const FloatPrimvarData > widths=std::nullopt, std::optional< const Vec3fPrimvarData > normals=std::nullopt, std::optional< const Vec3fPrimvarData > displayColor=std::nullopt, std::optional< const FloatPrimvarData > displayOpacity=std::nullopt)

Defines a UsdGeomPoints prim on the stage.

pxr::UsdLuxRectLight usdex::core::defineRectLight(pxr::UsdStagePtr stage, const pxr::SdfPath &path, float width, float height, float intensity=1.0f, std::optional< std::string_view > texturePath=std::nullopt)

Creates a rectangular (rect) light with an optional texture.

pxr::UsdLuxRectLight usdex::core::defineRectLight(pxr::UsdPrim parent, const std::string &name, float width, float height, float intensity=1.0f, std::optional< std::string_view > texturePath=std::nullopt)

Creates a rectangular (rect) light with an optional texture.

pxr::UsdGeomXform usdex::core::defineXform(pxr::UsdStagePtr stage, const pxr::SdfPath &path, std::optional< const pxr::GfTransform > transform=std::nullopt)

Defines an xform on the stage.

pxr::UsdGeomXform usdex::core::defineXform(pxr::UsdPrim parent, const std::string &name, std::optional< const pxr::GfTransform > transform=std::nullopt)

Defines an xform on the stage.

pxr::UsdAttribute usdex::core::getLightAttr(const pxr::UsdAttribute &defaultAttr)

Get the "correct" light attribute for a light that could have any combination of authored old and new UsdLux schema attributes.

bool usdex::core::isLight(const pxr::UsdPrim &prim)

Determines if a UsdPrim has a UsdLuxLightAPI schema applied.

bool usdex::rtx::addDiffuseTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)

Adds a diffuse texture to the PBR material.

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

Adds a metallic texture to the PBR material.

bool usdex::rtx::addNormalTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)

Adds a normal texture to the PBR material.

bool usdex::rtx::addOpacityTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)

Adds an opacity texture to the PBR material.

bool usdex::rtx::addOrmTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)

Adds an ORM (occlusion, roughness, metallic) texture to the PBR material.

bool usdex::rtx::addRoughnessTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)

Adds a roughness texture to the PBR material.

pxr::UsdShadeShader usdex::rtx::computeEffectiveMdlSurfaceShader(const pxr::UsdShadeMaterial &material)

Get the effective surface Shader of a Material for the MDL render context.

pxr::UsdShadeShader usdex::rtx::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 usdex::rtx::createMdlShaderInput(pxr::UsdShadeMaterial &material, const pxr::TfToken &name, const pxr::VtValue &value, const pxr::SdfValueTypeName &typeName, std::optional< const usdex::core::ColorSpace > colorSpace=std::nullopt)

Create an MDL shader input.

pxr::UsdShadeMaterial usdex::rtx::defineGlassMaterial(pxr::UsdPrim parent, const std::string &name, const pxr::GfVec3f &color, const float indexOfRefraction=1.491f)

Defines a Glass UsdShadeMaterial interface that drives both an RTX render context and the universal render context.

pxr::UsdShadeMaterial usdex::rtx::defineGlassMaterial(pxr::UsdStagePtr stage, const pxr::SdfPath &path, const pxr::GfVec3f &color, const float indexOfRefraction=1.491f)

Defines a Glass UsdShadeMaterial interface that drives both an RTX render context and the universal render context.

pxr::UsdShadeMaterial usdex::rtx::definePbrMaterial(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 a PBR UsdShadeMaterial interface that drives both an RTX render context and the universal render context.

pxr::UsdShadeMaterial usdex::rtx::definePbrMaterial(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 a PBR UsdShadeMaterial interface that drives both an RTX render context and the universal render context.