-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix animations and attachments once and for all #15354
Conversation
b835db7
to
745accc
Compare
510de08
to
8b0eab1
Compare
I have started to cleanly split this up into the "refactor" and "fix" parts, otherwise it's unmanageable for me to get to a reviewable state.
Indeed it isn't. |
Closing in favor of #15722. |
This is supposed to fix skeletal animation / attachment related jank, specifically #15186, #14818, #14817 and to refactor a part of the code in preparation of e.g. #9218. See also #15350.
It works by doing things the way they should be done. Currently we have Irrlicht doing things wrong and 2-3 layers of workarounds, some in Irrlicht, some in Luanti, on top of it. This is a broken mess.
What should be done is conceptually pretty simple: First, we need to recursively update the absolute transforms of node hierarchies consisting of scene nodes (including bones) inside
OnAnimate
.When rendering, we simply transfer these transforms to the mesh and let it do the CPU skinning. (Later we will want to do that on the GPU.)
Each animated scene node must store its own bone transformations for animation blending purposes (and later GPU skinning).
All the workarounds we currently have can essentially go out the window.
To do
This PR is WIP. I'm currently aiming for 5.11.0 since this will need a decent amount of testing.
Figure out why the heckit has unceased working.x
has just ceased workingReplace hints with binary search, refactor this to use a sort of "keyframes" struct (I have this around somewhere)Should be all nice and tidy now :)Fix stale nametag positions (figure out where to best update their position)can't reproduce (anymore?), they should be updated at the right point in time anyways (after rendering of everything 3d and thus after all absolute transforms have been computed)How to test
See the related issues.