Hello Guest

Author Topic: Samsung .apk: Animated Sprite is black box on some devices  (Read 5528 times)

stardust

  • Newbie
  • *
  • Posts: 2
    • View Profile
Samsung .apk: Animated Sprite is black box on some devices
« on: June 25, 2013, 06:37:03 pm »
Hey everyone

My 2DTK game is in certification phase for the Samsung store atm. I got feedback from Samsung, that for some devices an animated sprite on my startscreen shows up as a black box instead of the sprite. Because I don't own any of the listed devices I apparently can't reproduce the bug, but I think this might be something 2DTK related and not a unity problem. Has anybody had something similar? I attached a video and a list of problematic devices:

Tablet Galaxy Wi-Fi
Tablet Galaxy
Galaxy Nexus (M420S/M420K)


http://www.youtube.com/watch?v=caCJkbr5rBI&

Thank you very much for your help!

mukarillo

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Samsung .apk: Animated Sprite is black box on some devices
« Reply #1 on: June 25, 2013, 07:47:46 pm »
Well, i had this problem while working with iOS development.

Devices have a limited texture size, iphone 3~4 has a limit of 2048x2048, while ipad has a limit of 4096x4096... so, if you're making atlas higher than the limit, even tho the sprite has less than that, it wont work and will substitute for a black piece of sprite...

Check every sansung device for the GL_MAX_TEXTURE_SIZE and you can create atlases based on the screen size and manually change them in the begin of the game.

This might be the awnser you're looking for, but i bet the moderator will awnser you shortly!

Edit:

Using this website you can find different texture sizes for each device:
http://gfxbench.com/
Navigate to GL config > scroll down till you find: GL_MAX_TEXTURE_SIZE
like galaxy nexus:
http://gfxbench.com/device.jsp?benchmark=gfx27&D=Google+Galaxy+Nexus&testgroup=gl
« Last Edit: June 25, 2013, 07:55:52 pm by mukarillo »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Samsung .apk: Animated Sprite is black box on some devices
« Reply #2 on: June 25, 2013, 09:28:41 pm »
mukarillo is absolutely right.
The two things that can cause black textures:
1. Texture dimensions exceeding device limits.
2. Out of VRAM for textures

#1 is the most common reason. What is the size of that sprite collection?

stardust

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Samsung .apk: Animated Sprite is black box on some devices
« Reply #3 on: June 25, 2013, 10:45:44 pm »
Thx guys, this might be it. The Atlas is 4096x2048 so like you said, it is too big for these devices. I think I will work with multiple atlases for this texture and maybe I will also check all my other Sprite Collections so i might prevent other bugs.

Thank you so much for your fast help! <3