usdrt::UsdRenderPass

Defined in usdrt/scenegraph/usd/usdRender/pass.h

Functions

Variables

class UsdRenderPass : public usdrt::UsdTyped

A RenderPass prim encapsulates the necessary information to generate multipass renders. It houses properties for generating dependencies and the necessary commands to run to generate renders, as well as visibility controls for the scene. While RenderSettings describes the information needed to generate images from a single invocation of a renderer, RenderPass describes the additional information needed to generate a time varying set of images.

There are two consumers of RenderPass prims - a runtime executable that generates images from usdRender prims, and pipeline specific code that translates between usdRender prims and the pipeline’s resource scheduling software. We’ll refer to the latter as ‘job submission code’.

The name of the prim is used as the pass’s name.

For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdRenderTokens. So to set an attribute to the value “rightHanded”, use UsdRenderTokens->rightHanded as the value.

Public Functions

inline explicit UsdRenderPass(const UsdPrim &prim = UsdPrim())

Construct a UsdRenderPass on UsdPrim prim. Equivalent to UsdRenderPass::Get(prim.GetStage(), prim.GetPath()) for a valid prim , but will not immediately throw an error for an invalid prim.

inline explicit UsdRenderPass(const UsdSchemaBase &schemaObj)

Construct a UsdRenderPass on the prim held by schemaObj . Should be preferred over UsdRenderPass(schemaObj.GetPrim()), as it preserves SchemaBase state.

inline virtual ~UsdRenderPass()

Destructor.

inline operator bool() const

Boolean operator.

Returns

Return true if the contained prim is an instance of this schema using IsA, and false otherwise.

inline UsdAttribute GetPassTypeAttr() const

A string used to categorize differently structured or executed types of passes within a customized pipeline.

For example, when multiple DCC’s (e.g. Houdini, Katana, Nuke) each compute and contribute different Products to a final result, it may be clearest and most flexible to create a separate RenderPass for each.

Declaration

uniform token passType

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

Variability

SdfVariabilityUniform

inline UsdAttribute CreatePassTypeAttr() const

See GetPassTypeAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetCommandAttr() const

The command to run in order to generate renders for this pass. The job submission code can use this to properly send tasks to the job scheduling software that will generate products.

The command can contain variables that will be substituted appropriately during submission, as seen in the example below with {fileName}.

For example: command[0] = “prman” command[1] = “-progress” command[2] = “-pixelvariance” command[3] = “-0.15” command[4] = “{fileName}” # the fileName property will be substituted

Declaration

uniform string[] command

C++ Type

VtArray<std::string>

Usd Type

SdfValueTypeNames->StringArray

Variability

SdfVariabilityUniform

inline UsdAttribute CreateCommandAttr() const

See GetCommandAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetFileNameAttr() const

The asset that contains the rendering prims or other information needed to render this pass.

Declaration

uniform asset fileName

C++ Type

SdfAssetPath

Usd Type

SdfValueTypeNames->Asset

Variability

SdfVariabilityUniform

inline UsdAttribute CreateFileNameAttr() const

See GetFileNameAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetDenoiseEnableAttr() const

When True, this Pass pass should be denoised.

Declaration

uniform bool denoise:enable = 0

C++ Type

bool

Usd Type

SdfValueTypeNames->Bool

Variability

SdfVariabilityUniform

inline UsdAttribute CreateDenoiseEnableAttr() const

See GetDenoiseEnableAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdRelationship GetRenderSourceRel() const

The source prim to render from. If fileName is not present, the source is assumed to be a RenderSettings prim present in the current Usd stage. If fileName is present, the source should be found in the file there. This relationship might target a string attribute on this or another prim that identifies the appropriate object in the external container.

For example, for a Usd-backed pass, this would point to a RenderSettings prim. Houdini passes would point to a Rop. Nuke passes would point to a write node.

inline UsdRelationship CreateRenderSourceRel() const

See GetRenderSourceRel(), and also Create vs Get Property Methods for when to use Get vs Create.

inline UsdRelationship GetInputPassesRel() const

The set of other Passes that this Pass depends on in order to be constructed properly. For example, a Pass A may generate a texture, which is then used as an input to Pass B.

By default, usdRender makes some assumptions about the relationship between this prim and the prims listed in inputPasses. Namely, when per-frame tasks are generated from these pass prims, usdRender will assume a one-to-one relationship between tasks that share their frame number. Consider a pass named ‘composite’ whose inputPasses targets a Pass prim named ‘beauty. By default, each frame for ‘composite will depend on the same frame from ‘beauty’: beauty.1 -> composite.1 beauty.2 -> composite.2 etc

The consumer of this RenderPass graph of inputs will need to resolve the transitive dependencies.

inline UsdRelationship CreateInputPassesRel() const

See GetInputPassesRel(), and also Create vs Get Property Methods for when to use Get vs Create.

inline UsdRelationship GetDenoisePassRel() const

The The UsdRenderDenoisePass prim from which to source denoise settings.

inline UsdRelationship CreateDenoisePassRel() const

See GetDenoisePassRel(), and also Create vs Get Property Methods for when to use Get vs Create.

UsdPrim GetPrim() const

Return this schema object’s held prim.

SdfPath GetPath() const

Return the SdfPath to this schema object’s held prim.

Public Static Functions

static inline UsdRenderPass Define(const UsdStageRefPtr &stage, const SdfPath &path)

Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined()) on this stage.

Public Static Attributes

static const UsdSchemaType schemaType = UsdSchemaType::ConcreteTyped

Compile time constant representing what kind of schema this class is.

See also

UsdSchemaType