Skip to content

Conversation

@appgurueu
Copy link
Contributor

@appgurueu appgurueu commented Nov 8, 2025

The purpose of this is twofold:

The advanced benefit is that it closes #12663, letting modders combine multiple animation tracks (e.g. in player_api, no separate "walk + dig" animation would be needed: the two animations can simply be combined). This is very useful if the cartesian products of possible combinations would otherwise get large.

The other is more of a convenience that it lets you address named animations as found in glTF files. This makes it easier to just take such files off-the-shelf, no need to bake everything into a single track and be careful with picking the right frame numbers.

To do

This PR is Ready for Review.

I would love to have some feedback by mod / game devs on the API design.

There are two limitations: I did not bother with extending this feature to local animations or support for the model[] formspec element. Both can come later, though I'm not sure whether there's much point in supporting the former at all. There is also a non-negligible chance that we'll be able to make SSCSM APIs that obsolete both features happen.

(Minor TODO: Get permission to use the test model or replace it)

How to test

  • There should be no regressions related to skeletal animation. All of the following should still work:
    • Animated .x, .b3d, and .gltf / .glb models (e.g. those in devtest);
    • Animation blending;
    • Bone overrides including interpolation;
    • Local player animations;
    • model[] formspec element
  • The new feature should work. It can be tested rudimentarily using the gltf:multi_track entity: Punch to toggle one animation, right-click to toggle the other.

@appgurueu appgurueu added @ Script API Feature ✨ PRs that add or enhance a feature @ Client rendering labels Nov 8, 2025
@appgurueu appgurueu changed the title Feat/anim tracks Support (combining) multi-track (glTF) animations Nov 8, 2025
@appgurueu appgurueu force-pushed the feat/anim-tracks branch 3 times, most recently from d250a47 to f17d0d7 Compare November 8, 2025 19:32
@appgurueu appgurueu added the Rebase needed The PR needs to be rebased by its author label Nov 27, 2025
wip

stuffz

more stuff

el stuffino

it's an irr_ptr now

.

move to gltf mod

more

who doesn't love the .twitter model file format

draw the rest of the owl parrot

fmodf

yea
@appgurueu appgurueu removed the Rebase needed The PR needs to be rebased by its author label Dec 12, 2025
@appgurueu
Copy link
Contributor Author

Rebased.

@Wbjitscool
Copy link

would it be possible for player eating animations too in the future?

@appgurueu
Copy link
Contributor Author

would it be possible for player eating animations too in the future?

I'm not sure what you're asking, maybe come again?

This is a feature that lets you simultaneously play multiple animation tracks for gltf models.

I imagine this could be used for eating animations, e.g. with first-person attachments and by making use of the observers API.

@kromka-chleba
Copy link
Contributor

I took a brief look at the API and it looks decent.
I'm going to test this later.

(Minor TODO: Get permission to use the test model or replace it)

I can make a replacement model under CC BY-SA or CC0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@ Client rendering Feature ✨ PRs that add or enhance a feature @ Script API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow combining multiple mesh animations

3 participants