-
Notifications
You must be signed in to change notification settings - Fork 4
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
Global Animation with different track-length #13
Comments
nyCdkJNYDl.mp4When disabling the non-global sequence and removing all texture-transform-animations, the issue becomes much clearer. |
I'm not sure I understand the issue yet^^.
With "shells" I assume you refer to the rotating (cloudy) parts of the elemental, right? These are not effected by skeletal animation at all. You can easily check this by not calling
For testing I have not called Can you provide more details how I have to update the loader to achieve the result in your second video? For example I commented out all |
Yes, those big cloudy parts. When looking from above, there is one striking feature, one of the angles is >180°, here in the top-right: Prior to M2Loader 3.0 there were no global skeletal animations visible, but now there is one. When using the Dragonflight model and printing Line 2937 in 7fe01af
I get an array with 9 elements. The first 8 are global texture-transformations with one track each, the last one is a skeletal-animation with 12 tracks. ![]() When looking from above, the texture animations rotate counter-clockwise, the skeletal-animation rotates clockwise, but slower. To achieve the result in the second video, I removed this line from the loader to not have global texture-transformations: Line 272 in 7fe01af
and did not call manager.playSequence() to only have the global sequences play.
|
Hm, I just played around with the index.html and I noticed a problem with the controls: |
I guess we are using different version of the airelemental asset. What version do you see when you debug |
It's |
Thanks for the additional information. I did indeed overlook the global sequence that animates the skeleton. And indeed the tracks unfortunately have different time values. I'll file a commit with a fix! |
Does 48bef61 fix the issue? Tracks should now assigned to the correct global timeline. Besides, I've realized it doesn't make sense to select and play individual global sequences. I think in WoW these sequences are assumed to be played together all the time. Hence, there is now |
Ah yes, it works perfectly now. Thank you for the fix! |
Awesome! I'll publish |
xAvsrWaplr.mp4
When testing the new version with the air-elemental, I noticed one problem: the "shells" pause after each rotation, while they should rotate continuously. The issue seems to be that the skeletal-animation has tracks of different duration and THREE.js sets the duration for the whole clip to the maximum of the tracks, so the shorter tracks have to wait for the longer ones to finish.
For this instance I could fix it by simply adding a separate clip for each track, like this:
three-m2loader/M2Loader.js
Lines 425 to 426 in 7fe01af
replace with
However I have no idea if that has implications. Probably that should be done for other global animations as well. The airelemental also uses multiple GlobalTextureTransform-Animations, but they all only have a single track, so no issue there. And for non-global animations, all tracks (excluding ones with length 0) have the same length for the airelemental, but I have no idea if that is always the case, and whether tracks should loop individually if tracks do have different lengths.
The text was updated successfully, but these errors were encountered: