glTF to USD Metadata Mapping Guide
Converting 3D assets from the glTF (GL Transmission Format) standard to Pixar’s Universal Scene Description (USD) requires translating metadata across scene hierarchies, geometry definitions, material schemas, and user data. This article outlines the specific mapping processes that occur during import, highlighting how glTF JSON properties are translated into USD prims, attributes, and metadata dictionaries.
Asset-Level Metadata
glTF files contain top-level asset objects that define
global information. During USD import, these properties map to USD Stage
Layer metadata:
asset.versionandasset.minVersion: Written to the layer'scustomLayerDatadictionary under keys such asgltf:versionto preserve version provenance.asset.generator: Mapped to the stage-levelcommentfield or stored withincustomLayerData["creator"].asset.copyright: Saved to the stage'sdocumentationfield or insidecustomLayerData["copyright"].
Node and Hierarchy Mappings
glTF structures scenes as hierarchical arrays of nodes.
USD converts these nodes into typed scene graph prims:
- Node Identification: The
node.namemaps directly to a USD Prim name (e.g.,/Root/NodeName). If names are non-compliant with USD naming conventions (such as containing special characters), they are sanitized. - Transforms: glTF
translation,rotation(quaternions), andscalearrays map to USD standard transform operations onUsdGeomXformableprims:xformOp:translate,xformOp:orient, andxformOp:scale. When a 4x4matrixis used in glTF, it maps directly toxformOp:transform.
Geometry and Primitive Attributes
glTF meshes consist of primitives
containing accessor references. USD imports these as
UsdGeomMesh primitives:
- Vertex Positions: glTF
POSITIONmaps toUsdGeomMeshpoints. - Normals: glTF
NORMALmaps tonormals, with the interpolation set tovertex. - Texture Coordinates: glTF
TEXCOORD_0,TEXCOORD_1, etc., map to indexed primvars namedprimvars:storprimvars:st_0withfaceVaryingorvertexinterpolation. - Indices: The glTF primitive index accessor maps to
faceVertexIndices, whilefaceVertexCountsis automatically populated (typically with triangles, represented as arrays of 3s). - Vertex Colors:
COLOR_0maps toprimvars:displayColorandprimvars:displayOpacity.
PBR Material Definitions
glTF materials adhere to the PBR Metallic-Roughness workflow, which
translates natively to USD's UsdPreviewSurface shading
schema:
baseColorFactor&baseColorTexture: Map toinputs:diffuseColorandinputs:opacityon aUsdPreviewSurfaceshader.metallicFactor&roughnessFactor: Map toinputs:metallicandinputs:roughness.normalTexture: Maps toinputs:normal, often accompanied by aUsdUVTexturereading the texture with normal scale adjustments.emissiveFactor&emissiveTexture: Map toinputs:emissiveColor.occlusionTexture: Maps toinputs:occlusion.- Alpha Modes:
OPAQUE,MASK, andBLENDmap to theinputs:opacityThresholdattribute and USD render context metadata.
Skeletal Animation and Rigging
Rigging metadata in glTF skins is translated into USD's
UsdSkel schema:
skin.joints: Maps to the token array attributeskel:jointson aUsdSkelSkeletonprim.skin.inverseBindMatrices: Maps toskel:bindTransforms.JOINTS_0&WEIGHTS_0: Map to geometry primvarsprimvars:skel:jointIndicesandprimvars:skel:jointWeights.- Animations: glTF
animation.samplersandanimation.channelsmap to time-sampled attributes onUsdSkelAnimationprims (translations,rotations,scales).
Extras and Extensions
extras: Arbitrary user metadata found inside glTF objects is encapsulated directly into the USD object’scustomDatadictionary, maintaining keys and scalar/string values.- Extensions: Common Khronos extensions (such as
KHR_materials_unlitorKHR_texture_transform) map to specialized USD shading attributes, such as bypassing the lighting calculation for unlit shaders or inserting aUsdTransform2dprimvar reader for UV coordinates.