Atlas animations go weird on Android


#1

Just got a strange thing today.
When I built the game for Android, the Atlas animations went black, and this is what I got


Why am I getting this?
And there’s one more catch here, there things don’t happen with all of the atlas animations, some are totally fine??


#2

Wasn’t this an issue with a different image before? Make sure the impacted source texture file is is saved as png 24?


#3

Yeah, that’s typically the result when an image is in the wrong format. Also mentioned here: Problems with sprites in html (SOLVED)


#4

Didn’t work out. Tried converting all images to 32bit PNG. and nothing changed


#5

Please zip all the images that make up the atlas and send them to me (bjorn.ritzl@king.com).


#6

Sent :heavy_check_mark:


#7

I added all of the images to a new project and created an atlas. I immediately noticed that there was a problem since the images are in subfolders such as Bosses/Beast/Idle but all images were named tile000.png, tile001.png etc I assume you’ve created Animation Groups for each of these and added the correct images to each group? I did that at least and was able to play the various animations without any problem. Was there any image in particular that didn’t work?


#8

Yes that was because I used an online cutter to split it.

Yup!!

Every image I sent. I tried building them in a new project and got:

Instead of expected this:


#9

Very strange. Every image I tested worked like expected.

Does it matter if you build for desktop, mobile or web? Can you share a small sample project?


#10

No. i tried building for desktop and got the same results.

Here it is:
Corrupted.zip (1.3 MB)


#11

Works here:

Some things to test:

  • What if you take a single image, put it in an atlas and assign it on a sprite?
  • What if you use a single image as a particle fx?
  • What if you try one of the example projects?

Are you testing on Windows or OSX? Have you updated your drivers?


#12

Same results :slightly_frowning_face:

I tried building sidescroller example and it bundled out perfectly

Windows

I think I need to look in this.


#13

Ok, take your favourite graphics editor and create a new empty png and paste one of the images into that new png. Save it and try again? I’m thinking that there might be something about the format of the image that breaks when it’s processed into an atlas.

Share a single image here and let others try. I’m unable to reproduce the problem here on my end at least.


#14

Here it is
tile002
This problem is really getting in too much>>


#15

Did you also try with a newly created image?


#16

Try this edit edited


#17

Hey what did you just do to the image? It works perfect, as if you just recreated it. I would most certainly want to know this magic trick, @Pkeod the magician :mage: .


#18

This is a reoccurring issue Defold has with pngs saved at 8bit, save them as 16bit and it will work better. Defold should have a fix for it eventually so this isn’t necessary…

2018-12-09%2004_11_57-LNPOverlayWindow

You should try enabling the webp format in texture compression and see if that helps. Could you test that first before switching your images to 16bit?

BTW you don’t want 32bit. That’s for HDR.


#19

But those images are 32 bit. I converted them one by one long before, and as nothing turned out, I revived this post.


#20

I switched the one you uploaded to 16bit and re-uploaded (actually it was 8bit based on what was uploaded to the forum, maybe forum software converted it). If it works then that’s what you should use. 32bit you should not use. Who knows if it causes other problems.

You can set webp in your texture profiles. https://www.defold.com/manuals/texture-profiles/ I just want to know if it would help this issue without needing to convert the bits.