Open YuryKuvetski opened 5 years ago
well shit. OK, I can make another pass on changes in my upstream, spine-ts. There's a way to speed-up this: do you know if there is skin example in official spine-ts repo that i can use to test if its fixed?
is that enough? http://esotericsoftware.com/spine-json-format
No. I'll take skins example from https://github.com/EsotericSoftware/spine-runtimes/blob/3.7/spine-ts/webgl/demos/skins.js
I'm sorry, i have very long queue, maybe i'll do it in a week. You can modify pixi-spine.js
file manually if you want to use it right now.
ok
@ivanpopelyshev Also there is a bug with a bones section of an animation.
"bones": {
"boneName": {
"timelineType": [
{ "time": 0, "angle": -26.55 },
{ "time": 0.1333, "angle": -8.78 },
...
"time" parameter is optional now as I understand. So in my case it looks like this:
"animations": {
"animation": {
"bones": {
"_0008_male_main_body": {
"rotate": [
{ "curve": 0.25, "c3": 0.75 },
{ "time": 0.8667, "angle": 1.92, "curve": 0.25, "c3": 0.75 },
{ "time": 1.6667 }
],
"translate": [
{ "curve": 0.25, "c3": 0.75 },
{ "time": 0.8333, "x": -29.15, "y": -216.47, "curve": 0.25, "c3": 0.75 },
{ "time": 1.6667 }
],
"scale": [
{ "curve": 0.25, "c3": 0.75 },
{ "time": 0.8333, "x": 1.133, "y": 1.133, "curve": 0.25, "c3": 0.75 },
{ "time": 1.6667 }
]
},
...
So time is undefined and after some calculations it is NaN. Solution is to use 0 if time is undefined.
How do I update pixi-spine: I take all commits between previous and current version of https://github.com/EsotericSoftware/spine-runtimes/tree/3.8-beta/spine-ts , and apply them to pixijs runtime.
Thanks to your notices i'll be able to do it faster ;)
Hi, @ivanpopelyshev will these changes be added to the v4.x branch as well?
Only by demand :) Is your project big enough to stay on v4 because of possible problems with migration?
Yes, that would make us miss our deadline... :(
Spine 3.8 is still in beta. Are you sure you need it?
Our animator unfortunately updated to the beta version, and did a lot of work that I need to get in :(
OK, start the countdown, its 16:44 MSK time.
@anna8810 you do the same error as me lol. badlogic and nate tell me how get back (recover) to old version and not lost your work. it not the 3.8 but the 3.8.13 b http://esotericsoftware.com/forum/3-8-13-crash-pixijs-and-corrupted-project-file-Search-this-12066?p=53931#p53931
the 3.8.11 b work fine with pixi-spine. so you can keep 3.8 feature with freeze version at 3.8.11 b.
Well, i've got sidetracked by emergency, but im working on it. In a pair of hours you will get pixi-v4 + spine3.8
OK, please test this branch: https://github.com/pixijs/pixi-spine/tree/v4.x-3.8beta/bin
I've tested only raptor demo, but i didnt test any skins features
work fine on my side , thanks for this now, let see if we can have a tool for batch convert all files in a projet. :) http://esotericsoftware.com/forum/batch-convert-json-to-3-8-13-with-java-node-12087
@YuryKuvetski @anna8810 guys?
Sorry, we had a public holiday in Sweden yesterday so I was not at work. This will work for me, thanks guys! <3
Works fine for me, thanks. Sorry for late.
@ivanpopelyshev Should your code support old spine formats?
I can't find any logic which can parse an old format of skins. So I'm getting this exception(
No, its supposed to be 3.8-beta only, because there are too many changes that I dont know if its actually possible to load something old and show it the same way as new one.
OK, both v4 and v5 pixi + spine 3.7 3.8 are supported now. Just in different branches.
No, its supposed to be 3.8-beta only, because there are too many changes that I dont know if its actually possible to load something old and show it the same way as new one.
It is possible, I've cloned v4.x-3.8beta and updated the changes to the JSON export, and tested on a spine containing slots, skins, constraints, transforms, animation and blend mode. It is backward-compatible with 3.7 and no regression issues for 3.8 (I can provide an example export from both 3.7 and 3.8 for demo purposes)
@ivanpopelyshev I read you said that is 3.8-beta only, so I'm wondering if you want a pull request into a specific branch, or a new branch for this?
Note: the changes are for PIXI v4 (which we are currently using), but I assume the changes are easily applicable to PIXI v5 (I can do that as well, if you want the backward-compatibility)
@Ashden Please look in the README - https://github.com/pixijs/pixi-spine#pixi-spine
3.8beta branch is outdated.
3.8 has changes in IK and animations too, im not sure that they are not breaking.
When there were breaking changes between spine3.2 and 3.3 I also wondered whether i can make universal JSON import. The answer was "yes, but i dont want to support it in future".
Here is the same - there are already enough pixi-specific changes in runtime, and if I add some in JSON importer i'll take responsibility for it . I'm not sure that I'll be able to maintain them in future.
@ivanpopelyshev If your plan is to only use the latest Spine implementation and use the same strategy as they do (which is the obvious and natural choice), then yes, I fully agree with your decision. That being the case, I guess I can maintain a backwards-compatible version until all our projects get up to date with Spine 3.8, then we can move on your stable build for it.
PS: Just for kicks, I applied my patch on pixi4-spine3.8 and it's still working 😄
ok, give me the patch, just in case ;)
Of course I can make spine runtime much better than official, but.. ugh.. i have too many pixijs plugins on me :) need to stop sometimes. And badlogic might look at me funny, I dont want to undermine his authority on whats good for spine users.
Its better if I put more effort in publishing GPUPATCH again, it affects performance when people use big number of spine animations with deformed meshes.
backward-compatibility_to_3_7.patch.zip
I have the issue with many spines with deformed meshes too, so I'd like a fix for that 😄
Hi, I am trying to move to pixi 5 and spine 3.8.72. I have a very basic spine file and it is not working. Can someone please look into my files and see where I am wrong. This is very urgent as we are going to start a big game and we have already made a lot of animations using spine 3.8.72. Any help would be really appreciated. Spine_Run_tinkered.zip
@ayanguptapcg I'm on it . Can you at least tell me how its supposed to look?
@ayanguptapcg i dont understand what did you put in that whip.json , how it should work. Also spineboy.json
is clearly outdated so if you tried to test that too - it wont work, its like very very very old json file without skeleton
section.
I think you have a problem with your exports.
You can contact me in telegram t.me/hackerham if you want to solve it ASAP
Sorry for late reply. Here is modified file with another acutal atlas from the game. Spine_Run_tinkered.zip
It gives AtlasAttachmentLoader.ts:43 Uncaught Error: Region not found in atlas: error
For this error we made some change as demo file in whip atlas so atleast that was not throwing error but also does not show up anything.
Animated alpha is 0.03 . Any idea why?
nope, still nothing even if i set alpha to 1 everywhere
are you checking the whip or mysteryDoll? I don't see animated alpha anywhere...
doll. i've modified atlas file of course.
I am not able to see any alpha value in the atlas.. what should we do then? is 3.8.72 not supported? or are we doing something wrong. Can I get one 3.8 spine file which is working with the library to cross check or some hints for exports.
3.8 release with pixi-v5 works for everyone. Of course you are doing something different than other people. I dont know about that .72
part, i didnt look at latest-latest changes. The problem is that I cant even determine whether that wrong
is a spine bug , pixi-spine bug or just you messing with files :)
I'll try later again, but right now I suggest to look in official runtime https://github.com/EsotericSoftware/spine-runtimes/tree/3.8/spine-ts and try to put your files in official spine widget, I remember that some people posted videos on youtube on how to do it.
If your stuff doesnt work in official widget too, then its a problem for esotericsoftware forum.
Of course pixi-spine is also official, but its one step further from editor - it has spine-ts as an upstream but it also has changes specific to pixi users.
Thanks Ivan.. we will do that and come back to you with our finding. Thanks a lot for taking this up.
Hold on, im picking up something strange on my side.
ok.. fingers crossed
I published new version with a few changes that i picked from , but it doesnt help in your case.
The bigger problem is: https://pixijs.io/examples/#/plugin-spine/dragon.js is for spine 3.7 , and I dont have ANY examples that run with pixi in 3.8 on this computer. I cant test anything. I dont even know whether current version works at all on demo files.
It seems that I forgot to update examples from my other computer. I'll do it in a few hours, but right now I cant test anything :(
I just ran a test with the runtime and it does not load there. I tried both. Whip loads but does not show any animation and doll does not load at all. will try with some more atlases.
Heh, then you have to bother guys from esotericsoftware :) I certainly need more info to help you, maybe later.
I just found something that the json is having two skins. Though we have one called general in our spine software but when created it creates skins as an array and adds an default skin. So in the player if we change the skin manually by clicking the menu we can see the animation. Any idea how to set the skin by default to general.
use setSkin
, i guess :)
Thank you Ivan..
As I understand in Spine v3.8 json format was changed, skins now is an Array. It breaks your logic in the readSkeletonData function, it expects that root.skins is an object with skin names as keys and attachments as values.