pixijs/spine

Strange Rendering After Compression

kane-mason opened this issue · 2 comments

I am really unsure whether this is a bug with pixi-spine or something we could be doing differently our side, but we have tried a multitude of solutions without any success. Hence i have come here for any sort of advice / suggestions / investigations / fixes.

The Problem (watch the centre animation carefully):

Screen.Recording.2023-11-06.at.17.34.27.mov

The background:

The left animation: This is the source spine as exported directly from spine (for runtime 4.1.17). As you can see nothing wrong, animation plays out fine.

The middle amimation is the problem child. This animation is the source animation, with lossless compression applied by pingo (https://css-ig.net/pingo). At this point the png is still 32bit. You can see the flashes as the animation plays. If you observe the source sheet there is no evidence of this leading me to believe this has something to do with how it is rendered.

The right animation has the same compression as the middle animation, however it also has been further quantized by pnqquant (https://pngquant.org/). At this point the png is 8bit. Strangely, now the issue no longer occurs!

What we have tried:

  1. Removing masks within spine - no effect
  2. Removing blendModes within spine - no effect
  3. Exporting the spine over multiple smaller sheets - this works! Not ideal solution though as is a headache for the designers and results in multiple requests in the browser.
  4. Reducing compression level - Pingo has 4 lossless levels, s1 (least aggressive) - s4 (most aggressive). s1 does not show the issue for this particular animation, but affects other animations.

We still need to compress, we dont always want to use pngquant as the artifacting can be noticeably bad. So we still want to use the lossless options and have them render correctly.

I am able to share source files directly with a maintainer of this project if necessary.

Any thoughts here?

Having the same issue