godot icon indicating copy to clipboard operation
godot copied to clipboard

AnimatedSprite turns black in Firefox on Mac and Chrome on Android and crashes the game on Firefox on iOS

Open QushyQushy opened this issue 3 years ago • 5 comments

Godot version

3.5

System information

Android 12, GLES3

Issue description

I have a single animated sprite that is 860x860 that is 89 frames as a loading screen in my scene. It either renders black on Firefox in MacOS or Chrome on Android, or completely crashes the game on Firefox on iOS.

Steps to reproduce

Load an animated sprite in any of those browsers and devices.

Minimal reproduction project

The project is proprietary so unfortunately I can't provide it.

QushyQushy avatar Sep 26 '22 10:09 QushyQushy

We managed to get the AnimatedSprite to work by importing every frame seperately. We used a spritesheet before.

QushyQushy avatar Sep 26 '22 12:09 QushyQushy

@QushyQushy Please upload a minimal reproduction project to make this easier to troubleshoot.

That said, judging by your mention of a spritesheet, 860*860*89 is a lot of data to handle within a single texture. The devices you're trying to load this on are likely running out of memory. Therefore, it's expected that you have to use separate files for such large animations.

Calinou avatar Sep 26 '22 13:09 Calinou

@QushyQushy Please upload a minimal reproduction project to make this easier to troubleshoot.

That said, judging by your mention of a spritesheet, 860*860*89 is a lot of data to handle within a single texture. The devices you're trying to load this on are likely running out of memory. Therefore, it's expected that you have to use separate files for such large animations.

Yeah that's what I thought as well initially. Even a 4096x4096 spritesheet didn't work though. The only thing that worked was importing all the frames manually. Thats why I think this should still be investigated.

Unfortunately the art is not mine so I can't provide the spritesheet or make a minimal project. But any kind of large spritesheet online should yield similar results.

QushyQushy avatar Sep 27 '22 08:09 QushyQushy

Because I'm running into the same issue, here is my minimal reproduction project.

Godot version

4.2.2 4.3-dev6

System information

Android 13 iOS 17.3.1 Compatibility Renderer

Issue description

I have an animated TileSet and a normal TileSet. The animated TileSet was created from a single PNG (Spritesheet like) and animated with the TileSet Editor.

It Works on Firefox on Android; and in Edge and Firefox on Windows. In Chrome on Android the animated tiles are Black, only the normal tiles are visible. With Safarie on iOS the "game" loads and the tiles are Visible and animated, but the game crashes after a few secconds. (Not sure if related, iOS only loads since 4.3-dev6 enabled single threaded webexports...)

I dont have a Mac, so I cant test Firefox on Mac.

Minimal reproduction project

minimalproject#66433.zip

StillBeginner avatar May 16 '24 13:05 StillBeginner

Image Godot v4.4.rc1 - Windows 11 (build 26100) - Multi-window, 2 monitors - OpenGL 3 (Compatibility) - Intel(R) Iris(R) Xe Graphics (Intel Corporation; 32.0.101.5768) - 13th Gen Intel(R) Core(TM) i7-1355U (12 threads)

Same issue with this small texture as well.

I will try single frames to see if that works.

Edit: I exported them to single files, but the first frame was still black, however once I made the texture a power of 2 the issue went away. Some issue with Compatibility Renderer and AnimatedSprite3Ds and non power of 2 textures?

sysl-dev avatar Feb 22 '25 20:02 sysl-dev