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 Mesh "mesh"
{
float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)]
int[] faceVertexCounts = [4, 4, 4, 4, 4, 4]
int[] faceVertexIndices = [0, 4, 6, 2, 0, 1, 5, 4, 4, 5, 7, 6, 3, 7, 5, 1, 6, 7, 3, 2, 2, 3,... (truncated)]
point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.... (truncated)]
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"]
}
}