omni::connect::core::defineOmniGlassMaterial

Defined in omni/connect/core/MaterialAlgo.h

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.

MDL and UsdPreviewSurface use a linear color space, please convert RGB and sRGB values to linear

Note: The use of MDL shaders inside this Material interface is considered an implementation detail of the RTX Renderer. Once the RTX Renderer supports OpenPBR or MaterialX shaders we may change the implementation to author those shaders instead of MDL.

Parameters
  • parent – Prim below which to define the Material

  • name – Name of the Material

  • color – The color of the Material

  • indexOfRefraction – The Index of Refraction to set, 1.0-4.0 range

Returns

The newly defined UsdShadeMaterial. Returns an Invalid prim on error