Best Practices

Joint Transforms

Currently, UsdSkel only supports encoding orthogonal joint animations. The joint transforms that make up those animations need not be orthonormal, however it is recommended: In practice, not all applications support non-orthonormal transformations on joints, so interchange may not be successful if not adhering to clean, orthonormal transforms.

Transform Decomposition

UsdSkel provides its own transform decomposition method, UsdSkelDecomposeTransforms, for decomposing a transform into translate, rotate and scale components.

Clients may have their own transform decomposition methods with slightly different behavior. As long as UsdSkelMakeTransforms returns the correct results, using alternative decomposition methods is fine.

However, it is important that the results of decomposition methods are not mixed. Two decomposition methods may produce different translate, rotate and scale components, but that recombine to form the same transforms, so it may not be valid to set, say, rotations but not translations.

To avoid hard to debug transform composition issues, it is recommended that whenever any of the transform components is set on a UsdSkelAnimation primitive, all of the components are set.

Creating Primvars

When creating primvars using the UsdSkelBindingAPI, it is good practice to always specify both the primvar interpolation and elementSize. Otherwise, it is very easy to end up with invalid data in a composed scene.

Users are encouraged to use the UsdSkelBindingAPI::CreateJointIndicesPrimvar and UsdSkelBindingAPI::CreateJointWeightsPrimvar helper methods, which ensure that those properties are always correctly defined.

Skinned Prim Types

It's easy to fall into the trap of assuming that all skinnable prims will be UsdGeomMesh types, or similar. This is not true: any UsdGeomBoundable primitive may be treated as being skinnable. It is the client's responsibility to determine if they know how to skin a given primitive.

Number of Influences

Clients should not assume that the number of influences – I.e,. the primvar elementSize – will be within some threshold that they consider reasonable. If it is desired that a maximum number of influences be enforced, the client should enforce that by truncating the resulting influences themselves. The UsdSkelResizeInfluences helper method may be used towards that end.

Joint Influences

UsdSkel does not currently require joint weighting to be normalized, or sorted. It is, however, recommended. This can be done prior to writing data to USD using the UsdSkelNormalizeWeights and UsdSkelSortInfluences helper methods.