Author Topic: Black textures on Android *SOLVED*  (Read 8425 times)

Rahkola

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Black textures on Android *SOLVED*
« on: May 18, 2014, 07:03:38 AM »
Hi!

We we're having problems with our UI among with other textures on Android. Everything was working fine with iOS.
On some Android devices (Galaxy SI & SIII, Galaxy Tab) some of the materials and the whole NGUI UI went black occasionally.
First we thought it was the atlas textures being too big but we soon realized that the biggest atlas in use was 1024*1024.

Here's a screenshot of the problem:


The fix was to set anti-aliasing off completely.
Just wanted to report this if others are having this problem too. Also a workaround would be nice as we would love to use AA :P

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Black textures on Android *SOLVED*
« Reply #1 on: May 18, 2014, 10:45:44 AM »
As a footnote, black textures generally mean that the texture can't be supported on the device. Happens when you try to use a 4k texture on a device that supports only 2k max for example.

RDeluxe

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 18
    • View Profile
Re: Black textures on Android *SOLVED*
« Reply #2 on: June 05, 2014, 07:11:16 AM »
I would like to use this topic (instead of creating a new one). I have a black texture problem, because of their size. It's only for the background textures which are really big (to allow support for retina/uHD resolutions).

I'm trying to play with the Texture Quality settings, thinking that Unity will resize them at runtime, but is it the good solution ? Here is the question i created on Unity Answer. I'll update it and update this answer too.

Tks !

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Black textures on Android *SOLVED*
« Reply #3 on: June 06, 2014, 01:57:54 AM »
Unity won't resize textures automatically for you. It's up to you to load the correctly sized texture -- by loading either the HD or UHD version of it.

ryan

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 90
    • View Profile
Re: Black textures on Android *SOLVED*
« Reply #4 on: June 06, 2014, 12:00:25 PM »
He might be talking about the platform-specific settings, where you can specify max texture size per platform.  Unity will resize your 4K atlas down to 2K if you tell it to, but that doesn't play well with NGUI's atlases.  The UV coordinates get all messed up.