usdrt::UsdRenderProduct

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

Functions

Variables

class UsdRenderProduct : public usdrt::UsdRenderSettingsBase

A UsdRenderProduct describes an image or other file-like artifact produced by a render. A RenderProduct combines one or more RenderVars into a file or interactive buffer. It also provides all the controls established in UsdRenderSettingsBase as optional overrides to whatever the owning UsdRenderSettings prim dictates.

Specific renderers may support additional settings, such as a way to configure compression settings, filetype metadata, and so forth. Such settings can be encoded using renderer-specific API schemas applied to the product prim.

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 UsdRenderProduct(const UsdPrim &prim = UsdPrim())

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

inline explicit UsdRenderProduct(const UsdSchemaBase &schemaObj)

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

inline virtual ~UsdRenderProduct()

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 GetProductTypeAttr() const

The type of output to produce. The default, “raster”, indicates a 2D image.

Declaration

uniform token productType = "raster"

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

Variability

SdfVariabilityUniform

Note

In the future, UsdRender may define additional product types.

inline UsdAttribute CreateProductTypeAttr() const

See GetProductTypeAttr(), 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 GetProductNameAttr() const

Specifies the name that the output/display driver should give the product. This is provided as-authored to the driver, whose responsibility it is to situate the product on a filesystem or other storage, in the desired location.

Declaration

token productName = ""

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

inline UsdAttribute CreateProductNameAttr() const

See GetProductNameAttr(), 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 GetOrderedVarsRel() const

Specifies the RenderVars that should be consumed and combined into the final product. If ordering is relevant to the output driver, then the ordering of targets in this relationship provides the order to use.

inline UsdRelationship CreateOrderedVarsRel() const

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

inline UsdAttribute GetResolutionAttr() const

The image pixel resolution, corresponding to the camera’s screen window.

Declaration

uniform int2 resolution = (2048, 1080)

C++ Type

GfVec2i

Usd Type

SdfValueTypeNames->Int2

Variability

SdfVariabilityUniform

inline UsdAttribute CreateResolutionAttr() const

See GetResolutionAttr(), 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 GetPixelAspectRatioAttr() const

The aspect ratio (width/height) of image pixels.. The default ratio 1.0 indicates square pixels.

Declaration

uniform float pixelAspectRatio = 1

C++ Type

float

Usd Type

SdfValueTypeNames->Float

Variability

SdfVariabilityUniform

inline UsdAttribute CreatePixelAspectRatioAttr() const

See GetPixelAspectRatioAttr(), 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 GetAspectRatioConformPolicyAttr() const

Indicates the policy to use to resolve an aspect ratio mismatch between the camera aperture and image settings.

This policy allows a standard render setting to do something reasonable given varying camera inputs.

The camera aperture aspect ratio is determined by the aperture atributes on the UsdGeomCamera.

The image aspect ratio is determined by the resolution and pixelAspectRatio attributes in the render settings.

  • “expandAperture”: if necessary, expand the aperture to fit the image, exposing additional scene content

  • ”cropAperture”: if necessary, crop the aperture to fit the image, cropping scene content

  • ”adjustApertureWidth”: if necessary, adjust aperture width to make its aspect ratio match the image

  • ”adjustApertureHeight”: if necessary, adjust aperture height to make its aspect ratio match the image

  • ”adjustPixelAspectRatio”: compute pixelAspectRatio to make the image exactly cover the aperture; disregards existing attribute value of pixelAspectRatio

Declaration

uniform token aspectRatioConformPolicy = "expandAperture"

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

Variability

SdfVariabilityUniform

Allowed Values

expandAperture, cropAperture, adjustApertureWidth,

adjustApertureHeight, adjustPixelAspectRatio |

inline UsdAttribute CreateAspectRatioConformPolicyAttr() const

See GetAspectRatioConformPolicyAttr(), 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 GetDataWindowNDCAttr() const

dataWindowNDC specifies the axis-aligned rectangular region in the adjusted aperture window within which the renderer should produce data.

It is specified as (xmin, ymin, xmax, ymax) in normalized device coordinates, where the range 0 to 1 corresponds to the aperture. (0,0) corresponds to the bottom-left corner and (1,1) corresponds to the upper-right corner.

Specifying a window outside the unit square will produce overscan data. Specifying a window that does not cover the unit square will produce a cropped render.

A pixel is included in the rendered result if the pixel center is contained by the data window. This is consistent with standard rules used by polygon rasterization engines. UsdRenderRasterization

The data window is expressed in NDC so that cropping and overscan may be resolution independent. In interactive workflows, incremental cropping and resolution adjustment may be intermixed to isolate and examine parts of the scene. In compositing workflows, overscan may be used to support image post-processing kernels, and reduced-resolution proxy renders may be used for faster iteration.

The dataWindow:ndc coordinate system references the aperture after any adjustments required by aspectRatioConformPolicy.

Declaration

uniform float4 dataWindowNDC = (0, 0, 1, 1)

C++ Type

GfVec4f

Usd Type

SdfValueTypeNames->Float4

Variability

SdfVariabilityUniform

inline UsdAttribute CreateDataWindowNDCAttr() const

See GetDataWindowNDCAttr(), 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 GetInstantaneousShutterAttr() const

Deprecated - use disableMotionBlur instead. Override the targeted camera’s shutterClose to be equal to the value of its shutterOpen, to produce a zero-width shutter interval. This gives us a convenient way to disable motion blur.

Declaration

uniform bool instantaneousShutter = 0

C++ Type

bool

Usd Type

SdfValueTypeNames->Bool

Variability

SdfVariabilityUniform

inline UsdAttribute CreateInstantaneousShutterAttr() const

See GetInstantaneousShutterAttr(), 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 GetDisableMotionBlurAttr() const

Disable all motion blur by setting the shutter interval of the targeted camera to [0,0] - that is, take only one sample, namely at the current time code.

Declaration

uniform bool disableMotionBlur = 0

C++ Type

bool

Usd Type

SdfValueTypeNames->Bool

Variability

SdfVariabilityUniform

inline UsdAttribute CreateDisableMotionBlurAttr() const

See GetDisableMotionBlurAttr(), 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 GetCameraRel() const

The camera relationship specifies the primary camera to use in a render. It must target a UsdGeomCamera.

inline UsdRelationship CreateCameraRel() const

See GetCameraRel(), 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 UsdRenderProduct 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