glTF Morph Targets Beyond Vertex Positions

glTF 2.0 supports morph target animation beyond simple geometry displacements, allowing real-time renderers to deform surface details alongside vertex geometry. While dynamic mesh deformation typically focuses on vertex positions, the glTF specification officially standardizes morphing for surface normals and tangents, while also providing room for custom vertex attributes. This article details the specific attributes that can be morphed in glTF, how they function, and why they are essential for accurate visual rendering.

Officially Supported Standard Attributes

In the standard glTF 2.0 specification, a morph target is defined as a dictionary mapping attribute semantic names to accessor objects storing displacement vectors. Beyond POSITION, the specification officially supports two additional standard attributes:

  • NORMAL: Morph targets can store displacement vectors for vertex normals. As a mesh deforms—such as during facial animation or cloth simulation—the underlying surface curvature changes. Morphing normals ensures that diffuse and specular lighting respond accurately to the dynamic surface angles rather than relying on outdated base-mesh normals or computationally heavy runtime normal recalculations.
  • TANGENT: Morph targets can store displacement vectors for vertex tangents (specifically the XYZ directional components, with the W component inherited from the base attribute). Dynamic tangent deformation is critical when models use tangent-space normal maps. Morphing tangents along with positions prevents stretching, distortion, or inverted shading on normal-mapped surfaces during dynamic deformations.

Storage and Interpolation Mechanics

Unlike the base mesh attributes, which represent absolute coordinate values in model space, glTF morph target attributes represent additive displacements.

For NORMAL and TANGENT attributes:

  • The accessor stores relative offset vectors (\(\Delta N\) or \(\Delta T\)) corresponding to each vertex.
  • The runtime calculates the final attribute by multiplying each target's offset by its current scalar weight and adding the result to the base attribute value: \[\text{Final Attribute} = \text{Base} + \sum (\text{Target Offset} \times \text{Weight})\]
  • After blending morph target normals or tangents, the runtime engine typically normalizes the resulting vectors to ensure valid unit vectors for shading.

Custom and Application-Specific Morph Attributes

The glTF specification allows for custom morph target attributes using an underscore prefix (e.g., _COLOR_0 or _TEXCOORD_0).

While standard glTF 2.0 validation does not formally standardize morphing UVs (TEXCOORD_n) or vertex colors (COLOR_n), developers and DCC tools can implement these channels as application-specific morph targets. When supported by a custom engine or specialized loader:

  • Dynamic UVs (_TEXCOORD_n): Can be morphed to dynamically shift, scale, or distort textures across a deforming surface.
  • Dynamic Vertex Colors (_COLOR_n): Can blend dynamic tinting, blood/sweat masks, or specialized simulation data across vertices concurrently with shape changes.

Engines adhering strictly to baseline glTF ignore custom morph attributes unless explicitly programmed to parse and interpolate them in the vertex shader.