Limits of the Atlas?

What is the max number of images or size limitations for an Atlas? I keep getting an error when I try to bring in all the assets for “spineboy” from the spine example.

I’m doing a full export of all animations and not reducing the size of the image. I wasn’t worried about performance at this point just wanted to learn how to do this in defold. But it crashes and gives an error when i get near 30.

I did file the bug crash via the report error process. But just wondering if this is a known issue or by design and what is the best work around.

To recreate export spineboy pro with all animations. Do not reduce size of images and don’t compress the png. (not sure if this matters but it’s what I did).

Then import all the images to an atlas, except for the death animation. Then when I get do death image 75 it crashes. Sure you can do it with other images as well, but my current test trying to pin down the issue I used that as my last import. And it always crashes when I try to add that image. So it must be a size/# limitation. But still it shouldn’t crash it should give an error saying it can’t add anymore images.

Note: I reduced the export size of the images by 50% and now it doesn’t crash. So it’s a total size issue. I understand having a limit, but it shouldn’t crash. It should tell me I exceed the max size of the atlas and to reduce the size of the images or reduce the number of images.

BTW: I don’t think I’m doing this right. Am I supposed to export all the animation full frames? Or do I export a sprite for each body component and import that to the atlas? I think that’s what it’s supposed to do but when I export from Spine it’s doing the full animation and not the individual parts. So I guess I have to do that in photoshop or krita.

Ok I figured out how to export the spritesheet…I think. I need to check texture atlas: Pack.

Then I use the unpacker on it and voila. I have the individual PNGs ready to import to the atlas.

The size limit of an atlas depends on your target platform, but on desktop 16k textures should be possible, but not really recommended. You should aim for smaller.

There’s not really a limit when it comes to images, or it is at least a very large number.

It would be helpful if you shared the error.

Oh, so this is when you export from Spine? You should have started with that :slight_smile:

It is not clear to me if you have a problem with Defold or not? It seems like you got it working?

1 Like

Yes it working. However, defold shouldn’t crash when teh atlas hits the limit. Error trapping should catch this and tell the user they have hit the limit of the atlas. I’m sending you the images so you can repro. And yes I know this isn’t the way spine is used. I took a wrong step but still discovered this error. It’s it top priority, no. But graceful error handling is important I think.

Please create a repro project, and submit a bug instead. It will save us time when verifying the issue and a potential fix.

I have. I was just asking the forum if there are known limitations.

Oh, I didn’t find such an issue on github? :thinking:

Error importing “spineboy” exported png files rom spine to an atlas · Issue #10772 · defold/defold