VFI Asset Structure Examples#

This example illustrates the complete factory-level USD structure described in Factory-Level USD Structuring. Each section represents a separate USD layer file. File paths are relative to the root of the factory asset. You can use these snippets as a reference template when you build your own layered, instancing-friendly factory assets.

Directory Structure#

factory/ (directory structure)
factory/
├── root.usda                      # Root assembly stage (includes topology)
├── animation.usda                 # Animation sublayer (value clips metadata)
├── components/
│   ├── CardboardBox/
│   │   ├── CardboardBox.usda      # Asset interface
│   │   └── payload.usdc           # Asset payload
│   └── Robot/
│       ├── Robot.usda
│       └── payload.usdc
├── subcomponents/
│   └── Robot_LinkA                # Geometry subcomponents
│       └── link.usdc              # Subcomponent asset
├── materials
│   └── materials.usda             # Material library
│   └── hq-materials.usd           # Optional high-quality material variants
├── clips/
│   └── scenario_01.usdc           # Animation clip data
├── layers/
│   └── mat_overs.usda             # Domain-specific material overrides
└── material_flow/
    └── products.usda              # Point Instancer for object handling

A packaged variant used at runtime consolidates components and subcomponents into shared library layers; see Component and Subcomponent Library Packaging for that layout and USDA snippets.

Assembly Stage#

The root stage composes the full factory by sublayering animation and defining the assembly topology with asset references. Assets are organized into logical groups.

root.usda
#usda 1.0
(
    defaultPrim = "Root"
    endTimeCode = 1000
    framesPerSecond = 60
    metersPerUnit = 1
    startTimeCode = 0
    subLayers = [
        @./animation.usda@
    ]
    timeCodesPerSecond = 60
    upAxis = "Z"
)

def Xform "Root" (
    kind = "assembly"
)
{

    def Xform "MaterialFlow" (
        kind = "group"
        prepend references = @./material_flow/products.usda@
    )
    {
    }

    def Xform "Equipment" (
        kind = "group"
    )
    {
        def Xform "Robot" (
            kind = "component"
            prepend references = @./components/Robot/Robot.usda@
        )
        {
            double3 xformOp:translate = (5.0, 0, 0)
            uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"]
        }
    }
}

Animation Sublayer#

The animation sublayer defines value clips metadata, binding external animation data to the assembly hierarchy.

animation.usda
#usda 1.0
(
    framesPerSecond = 60
    timeCodesPerSecond = 60
)

over "Root" (
    clips = {
        dictionary default = {
            double2[] active = [(0, 0)]
            asset[] assetPaths = [@./clips/scenario_01.usdc@]
            string primPath = "/Root"
            double2[] times = [(0, 0), (1000, 1000)]
        }
    }
)
{
}

Asset Interface#

Each asset has an interface layer that defines its public surface. The interface declares kind = "component", provides assetInfo, and payloads the heavy geometry.

components/CardboardBox/CardboardBox.usda
#usda 1.0
(
    defaultPrim = "CardboardBox"
)

def Xform "CardboardBox" (
    assetInfo = {
        asset identifier = @./CardboardBox.usda@
        string name = "CardboardBox"
    }
    kind = "component"
    prepend payload = @./payload.usdc@
)
{
}

Asset Payload#

The payload layer contains the asset’s geometry hierarchy.

Articulated assets (like robots) reference instanced subcomponents for each rigid body, enabling animation while sharing geometry.

components/Robot/payload.usdc
#usda 1.0
(
    defaultPrim = "Root"
)

def Xform "Root"
{
    def "link_01" (
        instanceable = true
        prepend references = @../../subcomponents/Robot_LinkA/link.usdc@</default>
    )
    {
        double3 xformOp:translate = (0, 0, 0)
        uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient"]
    }

    def "link_02" (
        instanceable = true
        prepend references = @../../subcomponents/Robot_LinkA/link.usdc@</default>
    )
    {
        double3 xformOp:translate = (0, 0, 0.5)
        uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient"]
    }

    def "link_03" (
        instanceable = true
        prepend references = @../../subcomponents/Robot_LinkA/link.usdc@</default>
    )
    {
        double3 xformOp:translate = (0, 0, 1.0)
        uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient"]
    }
}

Simple assets (like products) may contain geometry directly or reference a single subcomponent.

components/CardboardBox/payload.usdc
#usda 1.0
(
    defaultPrim = "Root"
)

def Xform "Root"
{
    def Mesh "geometry" (
        prepend apiSchemas = ["MaterialBindingAPI"]
    )
    {
        # Mesh data (points, faceVertexCounts, faceVertexIndices, normals, etc.)
        rel material:binding = </Root/Materials/CardboardBoxMaterial>
    }

    def Scope "Materials"
    {
        def Material "CardboardBoxMaterial" (
            prepend references = @../../materials/materials.usda@</Materials/Plastic>
        )
        {
            color3f inputs:diffuseColor = (0.8, 0.2, 0.2)
        }
    }
}

Subcomponent Asset#

Subcomponents represent rigid geometry that can be instanced across multiple assets. They reference mesh data and bind materials from the canonical library.

subcomponents/Robot_LinkA/link.usdc
#usda 1.0
(
    defaultPrim = "default"
    metersPerUnit = 1
    upAxis = "Z"

    subLayers = [
        @../../../hq-materials.usd@
    ]

)

def Xform "default" (
    kind = "subcomponent"
)
{

    def Xform "body"
    {
        def Mesh "mesh_0" (
            prepend apiSchemas = ["MaterialBindingAPI"]
        )
        {
            # Mesh data (points, faceVertexCounts, faceVertexIndices, normals, etc.)

            rel material:binding = </default/Materials/BlueMetal>
        }
    }

    def Mesh "mesh_1" (
        prepend apiSchemas = ["MaterialBindingAPI"]
    )
    {
        # Mesh data (points, faceVertexCounts, faceVertexIndices, normals, etc.)

        rel material:binding = </default/Materials/OrangePlastic>
    }

    def Scope "Materials"
    {
        def Material "BlueMetal" (
            instanceable = true
            prepend references = @../../../materials/materials.usda@</Materials/Metal>
        )
        {
            color3f inputs:diffuseColor = (0.2, 0.4, 0.8)
        }

        def Material "OrangePlastic" (
            instanceable = true
            prepend references = @../../../materials/materials.usda@</Materials/Plastic>
        )
        {
            color3f inputs:diffuseColor = (0.75, 0.56, 0.22)
        }
    }
}

Material Library#

The material library defines canonical materials that are referenced and specialized throughout the factory.

materials/materials.usda
#usda 1.0

def Scope "Materials"
{
    def Material "Metal"
    {
        color3f inputs:diffuseColor = (0.18, 0.18, 0.18)
        token outputs:surface.connect = </Materials/Metal/previewShader.outputs:surface>

        def Shader "previewShader"
        {
            uniform token info:id = "UsdPreviewSurface"
            color3f inputs:diffuseColor.connect = </Materials/Metal.inputs:diffuseColor>
            float inputs:metallic = 0.5
            float inputs:roughness = 0.3
            token outputs:surface
        }
    }

    def Material "Plastic"
    {
        color3f inputs:diffuseColor = (0.18, 0.18, 0.18)
        float inputs:opacity = 1
        token outputs:surface.connect = </Materials/Plastic/previewShader.outputs:surface>

        def Shader "previewShader"
        {
            uniform token info:id = "UsdPreviewSurface"
            color3f inputs:diffuseColor.connect = </Materials/Plastic.inputs:diffuseColor>
            float inputs:opacity.connect = </Materials/Plastic.inputs:opacity>
            float inputs:metallic = 0
            float inputs:roughness = 0.5
            token outputs:surface
        }
    }
}

Domain-Specific Layering (Material Specialization)#

Domain-specific layers let downstream teams specialize structured assets without modifying source files. This example targets material opinions at the subcomponent root path, references an HQ material library, and rebinds the mesh to the HQ material.

layers/mat_overs.usda
#usda 1.0

over "default"
{
    over "Materials"
    {
        over "BlueMetal"
        {
            prepend references = @../materials/hq-materials.usd@</Materials/BlueMetal>
        }
    }

    over "body"
    {
        over "mesh_0" (
            prepend apiSchemas = ["MaterialBindingAPI"]
        )
        {
            rel material:binding = </default/Materials/BlueMetal>
        }
    }
}

Animation Clip Data#

Animation clips contain time-sampled attribute values for movable parts. The clip data is referenced using value clips metadata in the animation sublayer.

clips/scenario_01.usdc
#usda 1.0
(
    endTimeCode = 1000
    framesPerSecond = 60
    startTimeCode = 0
    timeCodesPerSecond = 60
)

def "Root"
{
    def "MoveableParts"
    {
        def "Transporter_01"
        {
            custom token visibility
            token visibility.timeSamples = {
                0: "invisible",
                5: "inherited",
            }
            custom quatd xformOp:orient
            quatd xformOp:orient.timeSamples = {
                5: (1, 0, 0, 0),
                343: (1, 0, 0, 0),
                344: (0.989, 0, 0, 0.146),
                377: (0.707, 0, 0, 0.707),
            }
            custom double3 xformOp:translate
            double3 xformOp:translate.timeSamples = {
                5: (2.72, -6.5, 0.01),
                100: (3.5, -6.5, 0.01),
                200: (4.2, -6.5, 0.01),
            }
        }

        def "CardboardBox_01"
        {
            custom token visibility
            token visibility.timeSamples = {
                0: "invisible",
                50: "inherited",
                250: "invisible",
            }
            custom double3 xformOp:translate
            double3 xformOp:translate.timeSamples = {
                50: (2.72, -6.5, 0.8),
                150: (3.5, -6.5, 0.8),
                250: (4.2, -6.5, 0.8),
            }
        }
    }
}

Point Instancer (Object Handling)#

Point Instancers efficiently render large populations of identical objects. For object handling, time-sampled positions and orientations animate products through the factory without hierarchy changes.

material_flow/products.usda
#usda 1.0
(
    defaultPrim = "MaterialFlow"
    metersPerUnit = 1
    upAxis = "Z"
)

def Xform "MaterialFlow"
{
    def PointInstancer "CardboardBoxes" (
        kind = "subcomponent"
    )
    {
        rel prototypes = [</MaterialFlow/CardboardBoxes/Prototypes/CardboardBox>]
        int[] protoIndices = [0, 0, 0, 0, 0]

        point3f[] positions.timeSamples = {
            0: [(2.72, -6.5, 0.8), (3.5, -6.5, 0.8), (4.2, -6.5, 0.8), (5.0, -6.5, 0.8), (5.8, -6.5, 0.8)],
            100: [(3.5, -6.5, 0.8), (4.2, -6.5, 0.8), (5.0, -6.5, 0.8), (5.8, -6.5, 0.8), (6.6, -6.5, 0.8)],
            200: [(4.2, -6.5, 0.8), (5.0, -6.5, 0.8), (5.8, -6.5, 0.8), (6.6, -6.5, 0.8), (7.4, -6.5, 0.8)],
        }
        quath[] orientations.timeSamples = {
            0: [(1, 0, 0, 0), (1, 0, 0, 0), (1, 0, 0, 0), (1, 0, 0, 0), (1, 0, 0, 0)],
        }
        float3[] scales = [(1, 1, 1), (1, 1, 1), (1, 1, 1), (1, 1, 1), (1, 1, 1)]
        int64[] invisibleIds.timeSamples = {
            0: [0, 1, 2, 3, 4],
            50: [1, 2, 3, 4],
            100: [2, 3, 4],
            150: [3, 4],
            200: [4],
        }

        def Scope "Prototypes"
        {
            def "CardboardBox" (
                prepend references = @../components/CardboardBox/CardboardBox.usda@
            )
            {
            }
        }
        }
}

Component and Subcomponent Library Packaging#

For runtime deployment, the modular per-asset layout above can be packaged into shared library layers so the assembly resolves fewer files. Components and subcomponents live in library files (for example, Components.usdc and SubComponents.usdc), as described in Asset Structure Performance Optimizations and Tradeoffs.

factory_packaged/ (directory structure)
factory_packaged/
├── Line.usda                      # Assembly stage (references component library)
├── Components.usdc                # Library of component definitions + payloads
├── SubComponents.usdc             # Library of subcomponent geometry (shared)
├── materials.usda                 # Material library
└── clips/
    └── scenario_01.usdc

Assembly stage references the component library:

factory_packaged/Line.usda (simplified)
#usda 1.0
(
    defaultPrim = "Line"
    metersPerUnit = 1
    upAxis = "Z"
)

def Xform "Line" (
    kind = "assembly"
)
{
    def "Robot_1" (
        prepend payload = @Components.usdc@</Robot>
    )
    {}
    def "Robot_2" (
        prepend payload = @Components.usdc@</Robot>
    )
    {}
    def "CardboardBox_1" (
        prepend payload = @Components.usdc@</CardboardBox>
    )
    {}
}

Components library defines components and payloads that point into the subcomponent library:

factory_packaged/Components.usdc (simplified)
#usda 1.0
(
    defaultPrim = "Robot"
    metersPerUnit = 1
    upAxis = "Z"
)

def Xform "Robot" (
    kind = "component"
)
{
    def "Robot_LinkA" (
        prepend references = @SubComponents.usdc@</Robot_LinkA>
        instanceable = true
    )
    {}
    def "LinkB" (
        prepend references = @SubComponents.usdc@</LinkB>
        instanceable = true
    )
    {}
}

def Xform "CardboardBox" (
    kind = "component"
)
{
    def "Box" (
        prepend references = @SubComponents.usdc@</Box>
    )
    {}
}

SubComponents library holds shared geometry and materials:

factory_packaged/SubComponents.usdc (simplified)
#usda 1.0
(
    defaultPrim = "Robot_LinkA"
    metersPerUnit = 1
    upAxis = "Z"
)

def Xform "Robot_LinkA" (
    kind = "subcomponent"
)
{
    def Mesh "link_geom"
    {
        # ... mesh data or reference to mesh layer
    }
}

def Xform "LinkB" (
    kind = "subcomponent"
)
{
    def Mesh "link_geom"
    {
        # ... mesh data
    }
}

def Xform "Box" (
    kind = "subcomponent"
)
{
    def Mesh "box_geom"
    {
        # ... mesh data
    }
}

This packaged layout reduces the number of layer files the runtime must open: the assembly references one component library, and the component library references one subcomponent library, instead of many per-asset files. It corresponds to the “Component and subcomponent library packaging” strategy and the diamond pattern (extraction/conversion → structuring → optimization/packaging) described in Asset Structure Performance Optimizations and Tradeoffs.

Conclusion#

You now have end-to-end USD layer examples for assembly composition, animation clips, component interfaces and payloads, subcomponent instancing, material libraries, and point-instanced object handling. Use this page as an implementation reference alongside Factory-Level USD Structuring.