-
-
Notifications
You must be signed in to change notification settings - Fork 78
usdSkel
This note summarizes the USD spec evaluation and the Blender import evaluation for skinned meshes. The equations are written with generic prim names so they can be applied to any skinned asset.
-
p_local: mesh point in mesh-local space (as stored in the Mesh prim) -
G:primvars:skel:geomBindTransformon the Mesh prim (world-space bind transform) -
w_i: skin weight for jointi -
J_i(t): joint skeleton-space transform for jointiat timet -
B_i:bindTransforms[i]from the Skeleton (world-space bind pose) -
S(t): Skeleton prim world transform at timet(a.k.a.skelLocalToWorldTransform) -
M_meshLocal: mesh prim's authored xformOps (mesh-local Xform) -
M_parentBelowSkel: any parent Xforms below the SkelRoot that are ancestors of the mesh -
M_parentAboveSkel: any ancestors of the Skeleton prim (including SkelRoot if it is an ancestor)
In USD, skinned prim xformOps are ignored. The only transforms participating in skinning are:
geomBindTransform, joint transforms, and the Skeleton prim's world transform.
K_i(t) = inv(B_i) * J_i(t)
p_skel(t) = Σ_i [ w_i * K_i(t) * G * p_local ]
p_world(t) = S(t) * p_skel(t)
p_world(t) = S(t) * Σ_i [ w_i * inv(B_i) * J_i(t) * G * p_local ]
Important:
-
M_meshLocalandM_parentBelowSkelare ignored for skinned rendering. -
S(t)includes any ancestors of the Skeleton prim, which may include a SkelRoot if it is an ancestor of the Skeleton.
Blender (for this USD import) applies the object transform chain on top of armature deformation. So transforms authored on the mesh prim and its parents below the SkelRoot are applied in addition to skinning.
p_world_blender(t) = M_parentAboveSkel(t) * M_parentBelowSkel(t) * M_meshLocal * p_skin(t)
Where p_skin(t) is the armature-deformed point Blender computes from the Skeleton animation.
This is effectively:
p_skin(t) = Σ_i [ w_i * K_i(t) * G * p_local ]
So the full Blender-style equation becomes:
p_world_blender(t) = M_parentAboveSkel(t) * M_parentBelowSkel(t) * M_meshLocal
* Σ_i [ w_i * inv(B_i) * J_i(t) * G * p_local ]
Key difference vs USD spec:
- Blender applies
M_meshLocalandM_parentBelowSkel(mesh and parent XformOps) - USD spec does not apply those transforms to skinned geometry
-
USD spec: only
geomBindTransform, joint transforms, and Skeleton world transform affect skinned output. - Blender import: applies mesh + parent Xforms in addition to skinning, which can create double transforms.