all  /  test_assets  / schemaTests  / usdGeom  / transforms  / simple_transform .usda

Transforms

These files showcase different transform operations.

Schema specification: https://github.com/PixarAnimationStudios/USD/blob/release/pxr/usd/usdGeom/schema.usda

Simple Transform

simple_transform.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"
]

screenshot simple_transform.usda, usdrecord 22.08

Complex Transform

complex_transform.usda

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"
]

screenshot complex_transform.usda, usdrecord 22.08

Matrix Transform

matrix_transform.usda

This file shows an example of a mesh with a matrix transform.

uniform token[] xformOpOrder = ["xformOp:transform"]

screenshot matrix_transform.usda, usdrecord 22.08

Weird Matrix Transform

weird_matrix_transform.usda

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"]

screenshot weird_matrix_transform.usda, usdrecord 22.08

Nested Xforms

xforms_nested.usda

This file uses nestes Xforms to verify that transform operations are correctly applied in order.

screenshot xforms_nested.usda, usdrecord 22.08

Nested Scopes and Xforms

scopes_and_xforms_nested.usda

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.

screenshot scopes_and_xforms_nested.usda, usdrecord 22.08


Edit this page

simple_transform.usda

#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)]
        float3 xformOp:rotateXYZ = (30, 60, 90)
        float3 xformOp:scale = (1, 2, 3)
        double3 xformOp:translate = (4, 5, 6)
        uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
    }
}