• RuntimesBugs
  • An Error by a png sequence with a Mesh with vertecies.

Hello, everybody.

I need your guys' help! I'm having a problem.

So, I work in a company where we make online games and when I give the devs a json and an atlas file with an animated sprite sheet of a fire, which is a looping png sequence from After Effects with a Mesh and vertecies, they get an error from the Game Engine, and that is Pixijs.

I had a task to create a fire animation and to avoid this problem I disabled the meshes from the Setup and created the fire without any vertecies.

I am attaching screenshots by the devs of the error, I am uploading the atlas, json and png images from the export, and I am also uploading the Spine file with the images folder.

Also, I tried cropping the png sequence so I get a different resolution from After Effects, recreate all the meshes in new slots with new names, new vertecies, but I got the error again.

One more additional thing I'd like to say is that another colleague also gave the devs a json and atlas file with an animated mesh of a png sequence of a different animation from a different task, but the error did not occur with his file.

Some technical info. Spine version is 4.1.24 PRO. And some info by the devs:
"pixi-spine": "4.0.3",
"pixi.js": "7.1.2"

Thanks in advance for the help!

Here's a download link of the work files:


Related Discussions
...
blade11 изменил(а) название на "An Error by a png sequence with a Mesh with vertecies.".
  • Изменено

Your error log shows SpineExtended which doesn't appear to be in our spine-pixi runtime:
https://github.com/EsotericSoftware/spine-runtimes/tree/4.1/spine-ts/spine-pixi
I'm guessing you are using this pixijs/spine runtime?
https://github.com/pixijs/spine
You may need to ask for support there, since we don't maintain that runtime. I'm not sure how much of our stuff they use. Mario is our expert on that, he'll likely be here tomorrow/Monday.

Your skeleton export loads fine in Skeleton Viewer, so it should work in spine-pixi, unless there is a bug in spine-ts or spine-pixi. If there is an issue with our runtime we'd be happy to fix it!

Edit: BTW, not every runtime special cases slot color having alpha of 0:

Setting the alpha to zero to make an attachment invisible is not an efficient way to hide the attachment. Most game toolkits spend the same effort drawing an image with zero alpha as they do drawing an image that can be seen.

It is better to hide an attachment by setting a slot attachment key. To avoid an abrupt disappearance, the slot color can be used to fade to transparent before hiding.

Thanks for the reply.

When I switch between the fire animations I tried 2 ways to hide the fire png sequences, which were from a different scene. One way was to use a slot attachment keyframe to hide them and the other is to set the scale to 0 of a parent bone. Both ways give this error again. When I have the Mesh from the Setup turned on on the png sequences I get the error, but when I turn off the Mesh the error disappears.

I will have the devs of my team look at this post and what you said. 🙂

How you hide a slot's attachments doesn't affect your issue, but it is inefficient to hide by setting the alpha to zero because ALL the same work is done to render the images (unless the runtime special cases 0 alpha). Hiding using scale 0 is also not good because no runtime will special case that.

To ensure work is not done to draw the attachment, set attachment keys to hide the attachment. If you are sure your runtime special cases alpha 0 to skip doing the work of rendering the attachment, then setting the alpha to 0 is acceptable. In fact alpha 0 can be slightly better if it reduces the number of timelines by not needing slot attachment timelines.

Your error comes from a bug in the runtime for sequences. The first step could be to try it in spine-ts (or spine-webgl, spine-player, etc). If it doesn't work there, then let us know because it's our bug to fix. If it does work in our runtimes then the problem is in the Pixi runtime you are using.

All animations display correctly using the official phaser plugin that uses the 4.1 spine-ts runtime.

So basically it works with the official "spine-ts runtime", I cloned the project and yes... [EsotericSoftware/spine-runtimes/blob/4.1/spine-ts/spine-pixi/package.json].

But it doesn't with [pixijs/spine]....

Here is a sandbox with the pixi implementation that isn't working: [https://codesandbox.io/s/pixi-spine-test-c576ft?file=/src/index.js]

Maybe we should raise an issue in the pixijs spine repository...

  • Nate оценил это.

Yep, that's probably the way to go, and/or debug it to work out what's going wrong. That or you could change to our runtime. Technically it's still a WIP as it needs docs and a few other things, so while it would likely work for you, proceed with caution and that in mind.

Ahh, yes we will see what will work out 🙂 Thanks for the help!

Just to ask, I tried the skeleton viewer with the animation and the json loads, but the atlas doesn't. So can the problem be related to that or idk?

For me, the posted spine export loads and display ok in spine skeleton viewer 4.1.24, so it's handling the atlas ok.

The atlas loaded for me also. Skeleton Viewer looks for an atlas in the same folder as the data file, with the same name. Eg for skeleton.json it looks for skeleton.atlas (and some variations like skeleton-pma.atlas).

Regarding pixi-spine, the third party runtime you are using, I'm afraid we're not much of help. You could file an issue on their tracker. But last time I checked, development has been dormant, as the main maintainer left the project.

spine-pixi is a work in progress as Nate said, but that's mostly related to documentation and samples missing. The core functionality should be stable, as we have a handful of customers who are already using it in production.

5 дней спустя

Hey, everybody.
Sorry for the late reply. So, it turns out that pixi is having a problem with meshes of png sequences. This bug has been reported a year ago to the pixi devs, but it still hasn't been fixed. Obviously, Spine is all good here. The pixi developers need to fix it, but nothing has been done for over a year, so we would have to go around this bug. I remade my animation without meshes.

Thank you very much for the support.