 File:
File: DrawModes.usd
A model of the classic Utah Teapot, with other Teapot variations.
The Teapot asset is a model, specifically a component. Among the other expected features of a component (such as a payload), it demonstrates properly configured draw modes. Also represented are geomsubsets, model and shading variants, and UsdPreviewSurface 2.4 materials.
Draw Mode provides a light-weight representation of models in a scene, while still providing useful information and context to the viewer. When lofted outside of a payload, draw mode can provide a rich representation for unloaded models.
The DrawModes.usd scene demonstrates all of the various draw mode options in the asset.
For technical details on draw mode, see the UsdGeomModelAPI documentation.
 
  File:
File: Teapot.usd
The modelVariant variant contains two options: Utah and Fancy. Each references its corresponding geometry layer stored in the geo folder.
When drawMode is set to “cards”, each model variant has one set of texture maps. these are all stored in the cards folder. Both “box” and “cross” options are demonstrated with all axes.
Each model variant has its own set of shading variants. drawModeColor is setup to reflect the different shadingVariants.
All texture maps are stored in the textures folder.
usdrecordThe asset was produced by Chris Rydalch at SideFX Software, with feedback from the Houdini and USD communities.
The original Fancy Teapot data was part of the Tea Set created by James Ray Cook, Jurita Burger, and Rico Cilliers at PolyHaven. They generously made it available under a Public Domain - CC0 license.
Public Domain - CC0
#usda 1.0
(
    defaultPrim = "Teapot"
    framesPerSecond = 24
    metersPerUnit = 1
    timeCodesPerSecond = 24
    upAxis = "Y"
)
def Xform "Teapot" (
    kind = "component"
    prepend references = @./Teapot_Geometry.usd@
    variants = {
        string modelVariant = "Utah"
    }
    prepend variantSets = "modelVariant"
)
{
    variantSet "modelVariant" = {
        "Fancy" (
            variants = {
                string shadingVariant = "PorcelainFlowers"
            }
            prepend variantSets = "shadingVariant"
        ) {
            def Scope "Materials"
            {
                def Material "PorcelainFlowers"
                {
                    token outputs:surface.connect = </Teapot/Materials/PorcelainFlowers/UsdPreview.outputs:surface>
                    def NodeGraph "UsdPreview"
                    {
                        token outputs:surface.connect = </Teapot/Materials/PorcelainFlowers/UsdPreview/usdpreviewsurface.outputs:surface>
                        def Shader "usdpreviewsurface"
                        {
                            uniform token info:id = "UsdPreviewSurface"
                            color3f inputs:diffuseColor.connect = </Teapot/Materials/PorcelainFlowers/UsdPreview/img_diffuseColor.outputs:rgb>
                            float inputs:ior = 1.327
                            float inputs:metallic.connect = </Teapot/Materials/PorcelainFlowers/UsdPreview/img_ARM.outputs:b>
                            float inputs:occlusion.connect = </Teapot/Materials/PorcelainFlowers/UsdPreview/img_ARM.outputs:r>
                            float inputs:roughness = 0.125
                            float inputs:roughness.connect = </Teapot/Materials/PorcelainFlowers/UsdPreview/img_ARM.outputs:g>
                            token outputs:surface
                        }
                        def Shader "img_diffuseColor"
                        {
                            uniform token info:id = "UsdUVTexture"
                            asset inputs:file = @./textures/tea_set_01_diff_2k.jpg@
                            float2 inputs:st.connect = </Teapot/Materials/PorcelainFlowers/UsdPreview/primvar_st.outputs:result>
                            vector3f outputs:rgb
                        }
                        def Shader "primvar_st"
                        {
                            uniform token info:id = "UsdPrimvarReader_float2"
                            string inputs:varname = "st"
                            float2 outputs:result
                        }
                        def Shader "img_ARM"
                        {
                            uniform token info:id = "UsdUVTexture"
                            asset inputs:file = @./textures/tea_set_01_arm_2k.jpg@
                            token inputs:sourceColorSpace = "raw"
                            float2 inputs:st.connect = </Teapot/Materials/PorcelainFlowers/UsdPreview/primvar_st.outputs:result>
                            float outputs:b
                            float outputs:g
                            float outputs:r
                        }
                    }
                }
                def Material "Ceramic"
                {
                    token outputs:surface.connect = </Teapot/Materials/Ceramic/UsdPreview.outputs:surface>
                    def NodeGraph "UsdPreview"
                    {
                        token outputs:surface.connect = </Teapot/Materials/Ceramic/UsdPreview/usdpreviewsurface.outputs:surface>
                        def Shader "usdpreviewsurface"
                        {
                            uniform token info:id = "UsdPreviewSurface"
                            color3f inputs:diffuseColor.connect = </Teapot/Materials/Ceramic/UsdPreview/primvar_displayColor.outputs:result>
                            float inputs:ior = 1.327
                            float inputs:roughness = 0.125
                            token outputs:surface
                        }
                        def Shader "primvar_displayColor"
                        {
                            uniform token info:id = "UsdPrimvarReader_float3"
                            string inputs:varname = "displayColor"
                            vector3f outputs:result
                        }
                    }
                }
            }
            variantSet "shadingVariant" = {
                "PorcelainFlowers" {
                    over "Geometry" (
                        prepend apiSchemas = ["MaterialBindingAPI"]
                    )
                    {
                        rel material:binding = </Teapot/Materials/PorcelainFlowers>
                        color3f[] primvars:displayColor = [(0.718, 0.62298465, 0.43295398)] (
                            interpolation = "constant"
                        )
                    }
                }
            }
        }
        "Utah" (
            variants = {
                string shadingVariant = "CeramicLimeGreen"
            }
            prepend variantSets = "shadingVariant"
        ) {
            def Scope "Materials"
            {
                def Material "PorcelainFlowers"
                {
                    token outputs:surface.connect = </Teapot/Materials/PorcelainFlowers/UsdPreview.outputs:surface>
                    def NodeGraph "UsdPreview"
                    {
                        token outputs:surface.connect = </Teapot/Materials/PorcelainFlowers/UsdPreview/usdpreviewsurface.outputs:surface>
                        def Shader "usdpreviewsurface"
                        {
                            uniform token info:id = "UsdPreviewSurface"
                            color3f inputs:diffuseColor.connect = </Teapot/Materials/PorcelainFlowers/UsdPreview/img_diffuseColor.outputs:rgb>
                            float inputs:ior = 1.327
                            float inputs:metallic.connect = </Teapot/Materials/PorcelainFlowers/UsdPreview/img_ARM.outputs:b>
                            float inputs:occlusion.connect = </Teapot/Materials/PorcelainFlowers/UsdPreview/img_ARM.outputs:r>
                            float inputs:roughness = 0.125
                            float inputs:roughness.connect = </Teapot/Materials/PorcelainFlowers/UsdPreview/img_ARM.outputs:g>
                            token outputs:surface
                        }
                        def Shader "img_diffuseColor"
                        {
                            uniform token info:id = "UsdUVTexture"
                            asset inputs:file = @./textures/tea_set_01_diff_2k.jpg@
                            float2 inputs:st.connect = </Teapot/Materials/PorcelainFlowers/UsdPreview/primvar_st.outputs:result>
                            vector3f outputs:rgb
                        }
                        def Shader "primvar_st"
                        {
                            uniform token info:id = "UsdPrimvarReader_float2"
                            string inputs:varname = "st"
                            float2 outputs:result
                        }
                        def Shader "img_ARM"
                        {
                            uniform token info:id = "UsdUVTexture"
                            asset inputs:file = @./textures/tea_set_01_arm_2k.jpg@
                            token inputs:sourceColorSpace = "raw"
                            float2 inputs:st.connect = </Teapot/Materials/PorcelainFlowers/UsdPreview/primvar_st.outputs:result>
                            float outputs:b
                            float outputs:g
                            float outputs:r
                        }
                    }
                }
                def Material "Ceramic"
                {
                    token outputs:surface.connect = </Teapot/Materials/Ceramic/UsdPreview.outputs:surface>
                    def NodeGraph "UsdPreview"
                    {
                        token outputs:surface.connect = </Teapot/Materials/Ceramic/UsdPreview/usdpreviewsurface.outputs:surface>
                        def Shader "usdpreviewsurface"
                        {
                            uniform token info:id = "UsdPreviewSurface"
                            color3f inputs:diffuseColor.connect = </Teapot/Materials/Ceramic/UsdPreview/primvar_displayColor.outputs:result>
                            float inputs:ior = 1.327
                            float inputs:roughness = 0.125
                            token outputs:surface
                        }
                        def Shader "primvar_displayColor"
                        {
                            uniform token info:id = "UsdPrimvarReader_float3"
                            string inputs:varname = "displayColor"
                            vector3f outputs:result
                        }
                    }
                }
            }
            variantSet "shadingVariant" = {
                "CeramicBlack" (
                    prepend apiSchemas = ["GeomModelAPI"]
                ) {
                    float3 model:drawModeColor = (0.025, 0.025, 0.025)
                    over "Geometry" (
                        prepend apiSchemas = ["MaterialBindingAPI"]
                    )
                    {
                        rel material:binding = </Teapot/Materials/Ceramic>
                        color3f[] primvars:displayColor = [(0.025, 0.025, 0.025)] (
                            interpolation = "constant"
                        )
                    }
                }
                "CeramicBlue" (
                    prepend apiSchemas = ["GeomModelAPI"]
                ) {
                    float3 model:drawModeColor = (0.013679987, 0.19873393, 0.912)
                    over "Geometry" (
                        prepend apiSchemas = ["MaterialBindingAPI"]
                    )
                    {
                        rel material:binding = </Teapot/Materials/Ceramic>
                        color3f[] primvars:displayColor = [(0.013679987, 0.19873393, 0.912)] (
                            interpolation = "constant"
                        )
                    }
                }
                "CeramicLimeGreen" (
                    prepend apiSchemas = ["GeomModelAPI"]
                ) {
                    float3 model:drawModeColor = (0.325, 0.825, 0)
                    over "Geometry" (
                        prepend apiSchemas = ["MaterialBindingAPI"]
                    )
                    {
                        rel material:binding = </Teapot/Materials/Ceramic>
                        color3f[] primvars:displayColor = [(0.325, 0.825, 0)] (
                            interpolation = "constant"
                        )
                    }
                }
                "CeramicOrange" (
                    prepend apiSchemas = ["GeomModelAPI"]
                ) {
                    float3 model:drawModeColor = (0.936, 0.26607358, 0.02246399)
                    over "Geometry" (
                        prepend apiSchemas = ["MaterialBindingAPI"]
                    )
                    {
                        rel material:binding = </Teapot/Materials/Ceramic>
                        color3f[] primvars:displayColor = [(0.936, 0.26607358, 0.02246399)] (
                            interpolation = "constant"
                        )
                    }
                }
                "CeramicRed" (
                    prepend apiSchemas = ["GeomModelAPI"]
                ) {
                    float3 model:drawModeColor = (0.936, 0, 0)
                    over "Geometry" (
                        prepend apiSchemas = ["MaterialBindingAPI"]
                    )
                    {
                        rel material:binding = </Teapot/Materials/Ceramic>
                        color3f[] primvars:displayColor = [(0.936, 0, 0)] (
                            interpolation = "constant"
                        )
                    }
                }
                "CeramicWhite" (
                    prepend apiSchemas = ["GeomModelAPI"]
                ) {
                    float3 model:drawModeColor = (0.767, 0.767, 0.767)
                    over "Geometry" (
                        prepend apiSchemas = ["MaterialBindingAPI"]
                    )
                    {
                        rel material:binding = </Teapot/Materials/Ceramic>
                        color3f[] primvars:displayColor = [(0.767, 0.767, 0.767)] (
                            interpolation = "constant"
                        )
                    }
                }
            }
        }
    }
}