These files showcase different transform operations.
Schema specification: https://github.com/PixarAnimationStudios/USD/blob/release/pxr/usd/usdGeom/schema.usda
This file shows an example of a mesh with a simple, common stack of transform operations.
uniform token[] xformOpOrder = [ "xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale" ]
simple_transform.usda, usdrecord 22.08
This file shows an example of a mesh with a complex stack of transform operations.
uniform token[] xformOpOrder = [ "xformOp:translate", "xformOp:translate:rotatePivotOffset", "xformOp:translate:rotatePivot", "xformOp:rotateXYZ:rotateOffset", "xformOp:rotateXYZ", "!invert!xformOp:translate:rotatePivot", "xformOp:translate:scalePivotOffset", "xformOp:translate:scalePivot", "xformOp:transform:shear", "xformOp:scale:scaleOffset", "xformOp:scale", "!invert!xformOp:translate:scalePivot" ]
complex_transform.usda, usdrecord 22.08
This file shows an example of a mesh with a matrix transform.
uniform token[] xformOpOrder = ["xformOp:transform"]
matrix_transform.usda, usdrecord 22.08
This file shows an example of a mesh with a matrix transform with weird, nonsensible values.
custom Matrix4d xformOp:transform = ((1, 2, 3, 4), (5, 6, 7, 8), (9, 10, 11, 12), (13, 14, 15, 1)) uniform token[] xformOpOrder = ["xformOp:transform"]
weird_matrix_transform.usda, usdrecord 22.08
This file uses nestes Xforms
to verify that transform operations are correctly applied in order.
xforms_nested.usda, usdrecord 22.08
This file uses nestes Scopes
and Xforms
to verify that transform operations are correctly applied in order and that a mix of Scopes
and Xforms
doesn’t cause issues.
scopes_and_xforms_nested.usda, usdrecord 22.08
#usda 1.0
(
customLayerData = {
string copyright = "Copyright 2022 Apple Inc. All rights reserved."
}
defaultPrim = "World"
upAxis = "Y"
metersPerUnit = 0.01
)
def Scope "World"
{
over "axis" (
references = @../../../_common/axis.usda@
)
{
}
def Xform "A"
{
double3 xformOp:translate = (1, 2, 3)
uniform token[] xformOpOrder = ["xformOp:translate"]
def Scope "B"
{
def Xform "C"
{
double3 xformOp:translate = (3, 3, 3)
uniform token[] xformOpOrder = ["xformOp:translate"]
def Cube "D"
{
}
}
}
}
def Cube "cube"
{
double3 xformOp:translate = (1, 1, 1)
uniform token[] xformOpOrder = ["xformOp:translate"]
}
}