UsdRenderSettingsBase#
Fully qualified name: usdrt::UsdRenderSettingsBase
-
class UsdRenderSettingsBase : public usdrt::UsdTyped#
Abstract base class that defines render settings that can be specified on either a RenderSettings prim or a RenderProduct 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.
Subclassed by usdrt::UsdRenderProduct, usdrt::UsdRenderSettings
Public Functions
-
inline explicit UsdRenderSettingsBase(const UsdPrim &prim = UsdPrim())#
Construct a UsdRenderSettingsBase on UsdPrim
prim
. Equivalent to UsdRenderSettingsBase::Get(prim.GetStage(), prim.GetPath()) for a validprim
, but will not immediately throw an error for an invalidprim
.
- inline explicit UsdRenderSettingsBase(
- const UsdSchemaBase &schemaObj,
Construct a UsdRenderSettingsBase on the prim held by
schemaObj
. Should be preferred over UsdRenderSettingsBase(schemaObj.GetPrim()), as it preserves SchemaBase state.
-
inline virtual ~UsdRenderSettingsBase()#
Destructor.
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
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
adjustApertureHeight, adjustPixelAspectRatio |Declaration
uniform token aspectRatioConformPolicy = "expandAperture"
C++ Type
Usd Type
SdfValueTypeNames->Token
Variability
SdfVariabilityUniform
Allowed Values
expandAperture, cropAperture, adjustApertureWidth,
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
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.
-
inline explicit operator bool() const#
Check if this schema object is compatible with it’s held prim and that the prim is valid.
A typed schema object is compatible if the held prim’s type is or is a subtype of the schema’s type. Based on
prim.IsA()
.An API schema object is compatible if the API is of type SingleApplyAPI or UsdSchemaType::MultipleApplyAPI, and the schema has been applied to the prim. Based on
prim.HasAPI
.This method invokes polymorphic behaviour.
See also
- Returns:
True if the help prim is valid, and the schema object is compatible with its held prim.
Public Static Attributes
-
static const UsdSchemaType schemaType = UsdSchemaType::AbstractTyped#
Compile time constant representing what kind of schema this class is.
See also
Protected Functions
-
inline virtual bool _IsCompatible() const#
Helper for subclasses to do specific compatibility checking with the given prim. Subclassess may override
_isCompatible
to for example check type compatibility or value compatibility on the prim.Overrides exist for UsdTyped and UsdAPISchemaBase.
This check is called when clients invoke the bool operator.
- Returns:
True if the schema object is compatible with its held prim.
-
inline explicit UsdRenderSettingsBase(const UsdPrim &prim = UsdPrim())#