How to set the display opacity for a prim?

I tried the script below, which renders the mesh correctly in blue, but opacity does not work. It does show the opacity value in the USD properties though.

    color = [(0, 0, 1)]
    opacity = [0.1]
    UsdGeom.Primvar(mesh.GetDisplayColorAttr()).SetInterpolation("constant")
    UsdGeom.Primvar(mesh.GetDisplayOpacityAttr()).SetInterpolation("constant")
    mesh.GetDisplayColorAttr().Set(color, time)
    mesh.GetDisplayOpacityAttr().Set(opacity, time)

displayOpacity currently only works in Hydra/Pixar Storm. You can get the same effect using materials and applying an opacity value in the shader.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.