• Editor
  • "Region not found in atlas" error

Hello, everybody.
One of the software devs I work with said that he got "Region not found in atlas" error. The error is connected to one png sequence used in the project. He said he has got this error with other projects from other animators as well. It's always connected to a png sequence. He said when he turns off the optimization for the file, the error doesn't happen. The file obviously works, but when he does his optimization for the game engine this error shows up. Any idea what's going on?

    Related Discussions
    ...

    The "Region not found in atlas" error typically occurs when the region name in the atlas file does not match the expected name in the Spine project. Here are a few potential causes and solutions based on the provided contexts:

    1. Path Mismatch: Ensure that the paths in your Spine project match those in the atlas file. Sometimes, the paths in the atlas file might include directories that are not present in the Spine project. You can open the .atlas file with a text editor to verify the region names and paths.

    2. Atlas and PNG Synchronization: Verify that the PNG files and the atlas file are correctly synchronized. If the atlas file references regions that are not present in the PNG file, this error can occur. Re-exporting the atlas and PNG files together might resolve this issue.

    3. Optimization Issues: Since the error occurs when optimization is turned on, it might be related to how the optimization process handles the atlas and PNG files. Ensure that the optimization process does not alter the paths or names of the regions in the atlas file.

    4. Premultiply Alpha (PMA): If the PNG files are exported with PMA and the optimization process does not handle PMA correctly, it might cause issues. Ensure that the optimization process respects the PMA settings.

    5. Atlas File Format: Ensure that the atlas file format is correct and that the game engine can read it properly. Sometimes, renaming the atlas file or adjusting its format can help.

    Here is a checklist to troubleshoot the issue:

    • Open the .atlas file with a text editor and verify the region names and paths.
    • Ensure that the PNG files referenced in the atlas file are present and correctly named.
    • Re-export the atlas and PNG files together from Spine.
    • Check the optimization process settings to ensure it does not alter the atlas or PNG files.
    • Verify that the game engine is using the correct Spine runtime version.

    If the issue persists, you might want to manually verify the pixel coordinates in the atlas file to ensure they match the PNG file for the problematic image.

    blade11 I am not sure exactly what is done in the optimization, so I can only guess, but it is possible, for example, that there are images in the sequence that are exactly the same, or that have no opaque pixels, and that these were combined or deleted during the optimization, resulting in an error when playing the sequence animation due to the lack of frames needed to play the sequence animation.
    If you have checked for such cases and cannot find the cause, you can email us the actual sequence images that are causing the error: contact@esotericsoftware.com
    Please include the URL of this forum thread in the email so we know the context. Then we can take a look at what's wrong.

    Hey, guys.
    Thanks for the quick response. We found out what's the problem. So, during the optimization the code was looking for the the letters "png", which is the extension of the png sequence, but I also had put "png" in the folder name and this is from where the error came.

      blade11 I am glad you have found the cause of the problem! Thank you for getting back to us 🙂