usdrt::UsdRenderSettings

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

Functions

Variables

class UsdRenderSettings : public usdrt::UsdRenderSettingsBase

A UsdRenderSettings prim specifies global settings for a render process, including an enumeration of the RenderProducts that should result, and the UsdGeomImageable purposes that should be rendered. UsdRenderHowSettingsAffectRendering 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 UsdRenderSettings(const UsdPrim &prim = UsdPrim())

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

inline explicit UsdRenderSettings(const UsdSchemaBase &schemaObj)

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

inline virtual ~UsdRenderSettings()

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

The list of UsdGeomImageable purpose values that should be included in the render. Note this cannot be specified per-RenderProduct because it is a statement of which geometry is present.

Declaration

uniform token[] includedPurposes = ["default", "render"]

C++ Type

VtArray<TfToken>

Usd Type

SdfValueTypeNames->TokenArray

Variability

SdfVariabilityUniform

inline UsdAttribute CreateIncludedPurposesAttr() const

See GetIncludedPurposesAttr(), 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 GetMaterialBindingPurposesAttr() const

Ordered list of material purposes to consider when resolving material bindings in the scene. The empty string indicates the “allPurpose” binding.

Declaration

uniform token[] materialBindingPurposes = ["full", ""]

C++ Type

VtArray<TfToken>

Usd Type

SdfValueTypeNames->TokenArray

Variability

SdfVariabilityUniform

Allowed Values

full, preview, “”

inline UsdAttribute CreateMaterialBindingPurposesAttr() const

See GetMaterialBindingPurposesAttr(), 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 GetRenderingColorSpaceAttr() const

Describes a renderer’s working (linear) colorSpace where all the renderer/shader math is expected to happen. When no renderingColorSpace is provided, renderer should use its own default.

Declaration

uniform token renderingColorSpace

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

Variability

SdfVariabilityUniform

inline UsdAttribute CreateRenderingColorSpaceAttr() const

See GetRenderingColorSpaceAttr(), 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 GetProductsRel() const

The set of RenderProducts the render should produce. This relationship should target UsdRenderProduct prims. If no products are specified, an application should produce an rgb image according to the RenderSettings configuration, to a default display or image name.

inline UsdRelationship CreateProductsRel() const

See GetProductsRel(), 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 UsdRenderSettings 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