Animating glTF Material Factors and emissiveStrength
In the core glTF 2.0 specification, animation tracks cannot directly
manipulate material properties such as emissiveFactor or
emissiveStrength. Standard glTF animations are strictly
restricted to targeting node transformations—specifically translation,
rotation, scale, and morph target weights. However, by using modern
extensions like KHR_animation_pointer, creators can
overcome this limitation to directly animate virtually any property in
the glTF document, including material factors and extension values.
Core glTF 2.0 Limitations
Under the baseline glTF 2.0 standard, the
animation.channel.target object only accepts a reference to
a node index and a path property restricted to
four specific string values:
translationrotationscaleweights
Because materials are declared separately in the
materials array and do not inherit from scene graph nodes,
core glTF provides no native mechanism to point an animation channel at
material properties like base color, metallic-roughness factors, or
emissive properties.
The Solution: KHR_animation_pointer
To resolve this limitation, the Khronos Group introduced the
KHR_animation_pointer extension. This extension updates the
animation channel target structure by adding a pointer
property that uses standard JSON Pointer syntax (RFC 6901) to target any
numeric or array property in the file.
When utilizing this extension alongside the
KHR_materials_emissive_strength extension, an animation
track can directly animate the emissiveStrength factor. A
target definition using this method looks like:
{
"extensions": {
"KHR_animation_pointer": {
"pointer": "/materials/0/extensions/KHR_materials_emissive_strength/emissiveStrength"
}
}
}This pointer instructs the runtime engine to interpolate the scalar value defined under the specified material's extension object based on the sampler's keyframe data.
Engine Support and Alternative Approaches
Adoption of KHR_animation_pointer is active across
modern WebGL and WebGPU engines like Three.js and Babylon.js, as well as
DCC tools like Blender via updated glTF export plugins.
If target runtimes do not yet support
KHR_animation_pointer, alternative approaches must be
used:
- Morph Targets with Baked Textures: Emissive effects can sometimes be simulated by morphing geometry between different UV coordinates or vertex-colored states.
- Runtime Scripting: Export standard glTF custom
properties or dummy transform nodes (e.g., animating the Y-position of
an empty node to represent intensity), then read those animated values
via engine-side code to manually drive the material's
emissiveStrengthat runtime.