Add glTF morph animation support (PoC) #16096
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements support for glTF morph animations.
This gives you an alternative way to animate vertices and normals (technically you could achieve this by having one joint per vertex, but for all but the most low-poly models that would be absurd).
Perhaps more interestingly, this lets you animate texture coordinates. (To give one example, this could be used to define a smooth clientside tile animation inside model files.)
It could also be applied to colors (which could enable cool effects, think rainbow or fake shine), but (1) we currently abuse colors for lighting and (2) our unsigned color format is currently unsuitable for storing the color deltas gltf demands.
Demo:
Screencast.from.2025-04-29.02-43-32.mp4
To do
This PR is a Work in Progress. Some TODOs are in-source / in commit messages.
How to test
Throw models using morph animations at it.