aspose.info
EN

USD - Universal Scene Description Format

Updated

What is a USD file?

A file with .usd extension is a Universal Scene Description file format that encodes data for the purpose of data interchanging and augmenting between digital content creation applications. Developed by Pixar, USD provides the ability to interchange elemental assets (such as models) or animation.

USD File Format

USD files can have binary format (also known as Crate files) or ASCII-backed files. Both these file formats are interchangeable where the references can be linked to .usd assets without changing the sources. USD file format consists of a set of C++ libraries with Python bindings for scripting. It enables assembly and organization of any number of 3D scene elements such as virtual sets, scenes, and shots to transmit them from application to application.

USD Data Types

The fundamental data types supported by the USD file format are listed in the following table.

Value type tokenC++ typeDescription
boolbool
ucharuint8_t8 bit unsigned integer
intint32_t32 bit signed integer
uintuint32_t32 bit unsigned integer
int64int64_t64 bit signed integer
uint64uint64_t64 bit unsigned integer
halfGfHalf16 bit floating point
floatfloat32 bit floating point
doubledouble64 bit floating point
timecodeSdfTimeCodedouble representing a resolvable time
stringstd::stringstl string
tokenTfTokeninterned string with fast comparison and hashing
assetSdfAssetPathrepresents a resolvable path to another asset
matrix2dGfMatrix2d2x2 matrix of doubles
matrix3dGfMatrix3d3x3 matrix of doubles
matrix4dGfMatrix4d4x4 matrix of doubles
quatdGfQuatddouble-precision quaternion
quatfGfQuatfsingle-precision quaternion
quathGfQuathhalf-precision quaternion
double2GfVec2dvector of 2 doubles
float2GfVec2fvector of 2 floats
half2GfVec2hvector of 2 half’s
int2GfVec2ivector of 2 ints
double3GfVec3dvector of 3 doubles
float3GfVec3fvector of 3 floats
half3GfVec3hvector of 3 half’s
int3GfVec3ivector of 3 ints
double4GfVec4dvector of 4 doubles
float4GfVec4fvector of 4 floats
half4GfVec4hvector of 4 half’s
int4GfVec4ivector of 4 ints

USD Example

An example of a USD file in plain ASCII file format is as following.

#usda 1.0

class "_class_Planet"
{
    bool has_life = False
}

def Xform "SolarSystem"
{
    def "Earth" (
        references = @./planet.usda@</Planet>
    )
    {
        bool has_life = True
        string color = "blue"
    }

    def "Mars" (
        references = @./planet.usda@</Planet>
    )
    {
        string color = "red"
    }

    def "Saturn" (
        references = @./planet.usda@</Planet>
        variants = {
            string rings = "with_rings"
        }
    )
    {
        string color = "beige"
    }
}
#usda 1.0

class "_class_Planet"
{
}

def Sphere "Planet" (
    inherits = </_class_Planet>
    kind = "model"
    variantSets = "rings"
    variants = {
        string rings = "none"
    }
)
{
    variantSet "rings" = {
        "none" {
            bool has_rings = False
        }
        "with_rings" {
            bool has_rings = True
        }
    }

}

References

See also