pavelgramen Posted March 12, 2020 Share Posted March 12, 2020 Hi, encountered a problem displaying spine animations in PIXI - texture issueseverything works in starlingthanks for any help ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 12, 2020 Share Posted March 12, 2020 (edited) Hi! Looks like premultiplied alpha issue again. Please publish the demo with the version of pixijs and pixi-spine you are using. Edited March 12, 2020 by ivan.popelyshev Quote Link to comment Share on other sites More sharing options...
pavelgramen Posted March 12, 2020 Author Share Posted March 12, 2020 (edited) Thanks for the quick response. "pixi-spine": "^2.1.7", "pixi.js": "^5.2.1" Edited March 12, 2020 by pavelgramen Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 12, 2020 Share Posted March 12, 2020 (edited) In case you use premultiplied alpha in png textures, specify it for pixi: dig out which baseTexture it uses and specify "mySpineResource.spineAtlas.pages[0].baseTexture.pmaMode = PIXI.ALPHA_MODES.PMA" We added this feature to pixi but didn't propagate it to pixi-spine. Edited March 12, 2020 by ivan.popelyshev Quote Link to comment Share on other sites More sharing options...
pavelgramen Posted March 12, 2020 Author Share Posted March 12, 2020 PMA did not help isPowerOfTwo: false mipmap: 1 pmaMode: 2 resolution: 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 12, 2020 Share Posted March 12, 2020 (edited) Then I dont know what can be wrong there. Please send me minimal demo, whether its a zip or jsfiddle Edited March 12, 2020 by ivan.popelyshev Quote Link to comment Share on other sites More sharing options...
pavelgramen Posted March 12, 2020 Author Share Posted March 12, 2020 I hope to get a normal run person.ZIP Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 12, 2020 Share Posted March 12, 2020 (edited) OK, confirmed, it works in latest spine-ts but not in pixi-spine. Maybe I can look at it in weekend, maybe not. There's an issue https://github.com/pixijs/pixi-spine/issues/318 with skins, maybe the same problem appears in your case. Yes, I couldn't fix it since november, it requires a total rewrite of "Spine.js" "update" function. If you want to investigate yourself, clone https://github.com/EsotericSoftware/spine-runtimes/tree/3.8/spine-ts and put your demo in webgl/examples. They dont have JSON by default there, so I had to modify loadSkeleton method a bit: // .. load function init () { //... assetManager.loadText("assets/Down.json"); assetManager.loadTextureAtlas("assets/Down.atlas"); //... } function load() { //... skeletons["Down"] = loadSkeleton("Down", "run", false, undefined, true); } function loadSkeleton (name, initialAnimation, premultipliedAlpha, skin, isJson) { //... var skeletonBinary = new spine.SkeletonBinary(atlasLoader); var skeletonJson = new spine.SkeletonJson(atlasLoader); var skeletonData = isJson ? skeletonJson.readSkeletonData(assetManager.get("assets/" + name + ".json")) : skeletonBinary.readSkeletonData(assetManager.get("assets/" + name + ".skel")); //... } Edited March 12, 2020 by ivan.popelyshev Quote Link to comment Share on other sites More sharing options...
pavelgramen Posted March 12, 2020 Author Share Posted March 12, 2020 sadly), I have 200+ such animations, I hope I can solve this problem in the near future Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 12, 2020 Share Posted March 12, 2020 From another point of view it looks like a texture rotation problem... I'll ask one more person to look at it. @eXponeta you alive? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 12, 2020 Share Posted March 12, 2020 Do you use telegram? t.me/hackerham Quote Link to comment Share on other sites More sharing options...
pavelgramen Posted March 12, 2020 Author Share Posted March 12, 2020 I’m alive, I don’t use a telegram, maybe Skype? pasha_gr Quote Link to comment Share on other sites More sharing options...
eXponeta Posted March 12, 2020 Share Posted March 12, 2020 So, maybe telegram ? Because Russian PIXI community alive in it. Quote Link to comment Share on other sites More sharing options...
pavelgramen Posted March 12, 2020 Author Share Posted March 12, 2020 (edited) ок, I will put it now Edited March 12, 2020 by pavelgramen Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 16, 2020 Share Posted March 16, 2020 OK, we had a problem with rotate=180 in atlases. Fixed. Use pixi-spine 2.1.8 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.