Skip to content

Conversation

@0b5vr
Copy link

@0b5vr 0b5vr commented Jan 16, 2026

Description

In KHR_animation_pointer, it can control individual morph weights via the path /nodes/{}/weights/{}. It allows us to have a simpler animation definition to control a single morph target without having an animation buffer that controls all associated weights, which is often bloated with a load of zeros.

See: https://github.com/KhronosGroup/glTF/blob/main/specification/2.0/ObjectModel.adoc#4-core-pointers

This PR adds support for /nodes/{}/weights/{} to the library.
This should support meshes with and without multi-materials (primitives).

Why I'm doing this

I'm currently working on the KHR_character specification, which depends on KHR_animation_pointer.
Our spec includes functionality to control characters' facial expressions through animations, which works nicely with /nodes/{}/weights/{}.

Test model

I have made a test model that contains a mesh with two morph targets and two animations that use /nodes/{}/weights/{}.
Note that the model does not contain multi-material meshes.

KHRAnimationPointerIndividualWeights.zip

Points need review

It is my first time contributing to this codebase, though I believe the diff is concise enough.
I assume you'll improve the parser implementation later, so I didn't make unnecessarily big changes to logic branches here.
If I'm doing anything wrong, please let me know.

Possible Workaround without this PR

Create animations without /nodes/{}/weights/{}.

@0b5vr 0b5vr force-pushed the individual-weights branch from 007ff86 to acec2bc Compare January 19, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant