• Editor
  • 解包图集时如何完全去除黑边或白边?

通常使用纹理解包器解包图集时,如果图片出现明显的黑边或者白边,则尝试勾选或者取消勾选非预乘alpha就可以解决问题,白边少见而且不显眼,但是也有部分图片出现黑边后,哪怕勾选或者取消勾选非预乘alpha,黑边仅仅只是变得不那么明显了,而不是消失,我该做些什么去让黑边消失?
我使用的版本为3.8,导出设置中无法设置出血,

使用非预乘alpha前:

使用非预乘alpha后:

    Related Discussions
    ...

    krammor My guess is that the image was compressed by an external tool after it was exported from Spine. If the image was processed in Spine and then another process was added, the black borders may not be properly removed by Spine's texture unpacker alone. It would be better to ask the person who provided the texture to provide the data in its pre-compressed state.

    For your information, you can also try unpacking with the latest Spine editor (currently 4.2.33), as unpacking textures is fine to run with a different version than the original textures were packed with. But if my guess is correct, unpacking with the latest version may not solve the problem.

      Misaki 你好,如你所料,使用最新版本也无法解决问题,我检查了一下,发现图集中有不少部件也有很明显的黑边,如果导出后的图集就是这样的,这是否与我打包设置中的选择有关,特别是红框选中的部分,是否就是造成图集有黑边的罪魁祸首?

      图集内的部件:

      图集打包设置中的内容:

        krammor The area you boxed in red should have nothing to do with that black border. That is basically what is happening because you have the Premultiply alpha (预乘Alpha) enabled.

        If you don't know what Premultiply alpha is for in the first place, the following video may help. (Maybe your asset is not used in Unity, however the advantages of using premultipllied alpha images are basically the same in other runtimes.):
        【[spine-unity] 常见导入问题解答】 【精准空降到 01:47】 https://www.bilibili.com/video/BV1BD4y1Y7By/?share_source=copy_web&t=107

        If the texture atlas page has not been compressed or otherwise processed after being packed by Spine, it will always unpack cleanly, even if it is a premultiplied alpha image. If you want to make sure it works correctly, you can try unpacking Spineboy's texture atlas page using the following .zip file:

        spineboy-pma.zip
        241kB

        As far as I've tested, unpacking the pre-multiplied alpha image works fine in the latest version, so unfortunately I don't have any specific advice for your problem.

          @krammor Please note that when using any image editor to modify and save a premultiplied-alpha atlas texture, this image editor must be aware that it has to save the image as a PMA image, which most image editors don't support. If you save the image incorrectly this way, the original information is already lost, this can't be restored automatically. You then have to manually edit the image and paint over the incorrect semi-transparent areas.