-
Notifications
You must be signed in to change notification settings - Fork 8
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
Synchronize animations with different durations #16
Comments
Maybe we can update the keyframes to fix this issue. A sequence can animate different things and I have assumed so far keyframe tracks targeting different properties all have equal duration. If that is not the case, we can extract the duration from the sequence object and check if a keyframe track has this value in its Do you think you can give this approach a try? It would also be great if you could share the WotLK version of the asset in this thread (I'll delete the link after I have downloaded it). |
Oh yes, I forgot to mention that. I thought about that, too, but I'm not sure if one animation could be used in multiple Sequences. I sent you the WotLK-model in an E-Mail a few weeks ago. I'm not aware of a site where you could download WotLK-models. If E-Mail doesn't work for you, I guess I'll have to upload the models somewhere. |
No, that can't happen. The loader generates keyframe tracks from the M2 keyframe definitions (which are on a per sequence basis). So a single keyframe track can only appear in a single clip. And a clip can only appear in one sequence. Ops, your mail went into the Spam directory^^. I've recovered it now. |
Okay, that's good, sounds way better than my current idea. I'll try that. Ah, it probably seemed suspicious. From an unknown address with attached ZIP, I can see why it would get flagged. |
I've tested the suggested fix in #16 (comment) today. TBH, I do not fully understand yet how a client is supposed to animate both assets correctly. If I force the sequence length for all keyframe tracks, the death animation of the elemental is right. However, the pulse effect of Maybe there are some additional sequence flags that the loader does not yet evaluate. |
I've noticed an issue with the WotLK-Version of the airelemental:
bSnxhbFc2T.mp4
When playing the death-sequence, the "main body" of the elemental should disappear, but that doesn't work. This is because the sequence consists of animations with different duration. Some are 3 seconds long, but some (those that fade out the body) are only ~0.9 seconds long. They set the opacity to 0 right at the end of those 0.9 seconds, but then the animation already loops and opacity is back at 1. Instead the animation should wait until all animations of that sequence are finished.
This is almost the opposite of #13.
I tried synchronizing the animations in this commit:
fcbeb7b
And it works for that case:
6CIAsmF1Z7.mp4
That looks like it does in game, except the hands and eyes should disappear as well, not sure what's the issue with that.
But I'm not too happy with the code as it really takes active control over the animation-orchestration. I'd rather let tree.js handle it, but I don't think that's possible, since the animations might have different root-objects and thus different mixers, which is why I couldn't get it done with https://threejs.org/docs/index.html#api/en/animation/AnimationAction.syncWith (according to ChatGPT, I have no idea if that's true).
Also I have no idea if doing it this way is always correct or if for some sequences this is wrong. Especially since the death-sequence doesn't really loop ingame anyway, so having the animations loop doesn't make sense. But for sequences like Stand/Walk/Run, maybe it is correct that animations loop individually instead of waiting.
The text was updated successfully, but these errors were encountered: