• EditorBugs
  • Part Of Texture Did Not Exported.

Problem statement

We made a Npc Sprite by spine tool, but when we export files as binary, the hand texture did not exported on atlas image.

I checked error message. It looked like an issue related to edge padding so I tried change my padding setting but did not effect.

Unexpectedly, when I changed my packing setting from polygon to grid, the texture suddenly started exporting correctly.

This is my setting that causes error. Can you check this problem?

Give step-by-step instructions so we can reproduce the problem, if possible.

Editor information

Tell us your Spine Editor version.
4.1

Post your entire spine.log file here (or attach it), if you got any error messages.

WARNING: Error packing images:
[error] Polygon does not fit within max page size 512 x 512 and edge padding 32,32: images/test
(512 x 488)
at s.Ndh.(:123)
at s.Ndh.(:69)
at s.TkE.(:131)
at s.iQB.(:167)
at s.TkE.(:134)
at s.mOI.(:286)
at s.rqA.(:249)
at s.mOI.(:78)
at s.mOI.(:189)
at s.xSb.(:97)
at s.XCT.(:693)
at java.lang.Thread.run(Unknown Source)

    Related Discussions
    ...

    NeoAlexLee Hmmm, it is strange that Max width and Max height are set to 1024, but the error log says the max page size is 512 x 512. Could you please send the files to us that can reproduce the problem via email?: contact@esotericsoftware.com

    Unexpectedly, when I changed my packing setting from polygon to grid, the texture suddenly started exporting correctly.

    This is indeed an unusual case, but may be possible. When using Polygons, Spine may give up before really achieving optimal results, because it might take so much time to calculate the optimal pack and unlimited attempts might make it look like the editor has frozen. This may result in a less efficient pack. This is especially true when the power of two is enabled.

    17 jours plus tard

    Hi, Thank you for your suggestion. However, please understand that we cannot provide the spine file for security reasons. In addition, the symptom about the texture I described is that only certain textures are not output and all other textures come out normally, not about program stopped by some reason. For example, an Atlas texture is exported to png where only the head has disappeared. If it's a problem related to polygon extraction you mentioned, do you have any plans to fix the bug?

      NeoAlexLee I am afraid to say this, but often texture packing problems can only be reproduced under certain conditions, and in order to determine the cause of the problem, we would like you to send us project files that can reproduce the problem. The project files you send us do not have to be the original. For example, you can black out all the images or delete some of the images as long as the problem is reproducible. Also, since this is a packing issue, you can remove all animations, bones, and other irrelevant items with this issue.

      In addition, the symptom about the texture I described is that only certain textures are not output and all other textures come out normally, not about program stopped by some reason.

      Yes, I understand that. I apologize for any confusion my description may have caused. What I said was based on the error log, which says Polygon does not fit within max page size 512 x 512 and edge padding 32,32: images/test, so I assumed that the problem was that the head image that did not fit within the page size so it has disappeared in the output result. I then mentioned my guess that the Polygons packing might output inefficient results compared to Grid, although this is a fairly rare case. In any case, this is just my guess at this point, so the cause is not yet clear.

      NeoAlexLee Thank you for sending me the repro project! I have confirmed that I am able to reproduce the result you described, but this skeleton seems to have a special setup.
      From the project you sent, I see that your skeleton is set up by cutting out a portion of the image that is already packed, as shown in the following image. Am I correct?:

      As far as I have tried with your Spine project, when I did the Polygons packing with all the mesh attachments removed except the hand removed, the output texture correctly contained the hand image. In other words, I suspect that as a result of cropping the image along the mesh hull for another mesh attachment (perhaps the difference image of the hand, since when I delete it, the hand image is shown in the packed texture atlas page), the area of the hand has been cropped and is not shown in the output results.

      However, I don't think Polygons packing is intended to be used in such cases in the first place, so this is not so much a bug as it is a different usage than expected.
      Basically, Spine expects you to import images that are separated by parts when animating in the editor, and then combine (pack) them into a single texture atlas page when exporting.

      I am not sure how many skeletons you have created in this way, but if this is the only skeleton that is not working for you, and it is working for many others, I think you can solve this problem by separating the hand image only from the current image. If this is the first skeleton you have created, you may want to replace the images for the entire skeleton with separate images to avoid encountering similar problems in the future.

      Actually it should be fine to have multiple meshes referring to the same image. The parts of the image that multiple meshes use is combined to make one polygon. That polygon makes up the part of the image that gets packed in the atlas as a single texture region.

      In the project you sent, your s.png file is mostly blank, so we can't see if it looks correct in the editor nor in the atlas. Can you please provide an image that has enough content so that we can see the different parts? Maybe you could turn all the colors black, so we can't see the content but can still see the outline. Or if you just send your real image, we will use it only for reproducing this problem, we won't share it, and we'll delete it from our computers and email account afterward.