Color change while animating

I’m trying to use gltf format as a vehicle to export/import animations in a biomechanical modeling software that traditionally used colors to indicate muscle activity. As far as I can tell the gltf format doesn’t support animation channels for material properties/color. Is that correct? If so, is there a way to still pass the color data in the gltf file/structure along with the animation (as a sort of animation data)? I’m writing my own viewer so I can apply the colors programmatically upon loading/playback but it would be great if I can leverage the features built into gltf rather than invent a new ad-hoc scheme.

Thank you,

Using a relatively new extension (KHR_animation_pointer), you can animate most properties in the glTF.

glTF/extensions/2.0/Khronos/KHR_animation_pointer/ at main · KhronosGroup/glTF (


The other option would be to use morph targets (or “shape keys”) affecting vertex colors. The base vertex colors could be white, having no effect on any textures, and the morph targets would tint specific vertices red when activated. This feature is allowed by the core glTF spec, but is not widely implemented, so you’d probably need to build custom loading as you mention. Most tools only apply morph targets on vertex positions and normals.

1 Like

Thank you Gary & Don for the quick response. Will definitely check the extension which looks promising. Using Morph targets is also an interesting idea that I haven’t considered, so thanks for the pointer.