Hello Guest

Author Topic: Platform Support vs Quality Settings  (Read 4259 times)

Smartphoneware

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 15
    • View Profile
Platform Support vs Quality Settings
« on: February 08, 2013, 06:55:00 pm »
Hello Unikron support,

I have a question about platform support (1x/2x/4x) in tk2d (iOS target).

Is it easier/better to design a game in max resolution (4x+mipmaps) and just use Unity "Quality Settings" with "Texture quality: Half res" where 2x textures are required, and Quarter res where 1x are required?

I just did some quick research:

 - One 4x texture+mipmaps is smaller than 4x+2x+1x (without mipmaps)
 - When compressed (pvrtc4), quality of Half res and Quarter res (produced from mipmaps) looks slightly better than its compressed 1:1 variant.
 - looks like that highest resolution texture is not loaded into RAM, only a specific MipMap level is loaded and processed in the renderer. (At least iPhone4 that has 2048x2048 max texture size can load 4096x4096 texture in Half res normally)

Is there some serious issue I do not see, and we should use PlatformSupport feature instead of Unity Quality Settings?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Platform Support vs Quality Settings
« Reply #1 on: February 08, 2013, 10:42:44 pm »
When loading one image with mips, eg. 4x with mips, will be naturally bigger than 4x without mips. (1.3x bigger more or less).

The second issue with QualitySettings, is that the mipmaps aren't generated programmatically and the atlases aren't generated with the required constraints.

For downscaling to work properly (not even considering compression here), it will require sprites to exist at downscaleable boundaries, depending on the number of mips required otherwise you'll get unwanted bleeding across sprites. If you think about a 2x2 sprite at 0, 0 and another at 2, 0 - when downscaled twice, you'll end up with the 2 sprites blended. Now the same case, with the 2x2 at 1,1 and the other at 3,1 - they will blend on the first downscale.
Add compression to the mix and things start getting a bit more complex...

But, if it works for you, go for it. Whether you'll see any of the above in your textures isn't certain, so its definitely worth a try, since its easy enough to try it.

Smartphoneware

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Platform Support vs Quality Settings
« Reply #2 on: February 09, 2013, 09:14:41 am »
Thanks for detailed reply. So, using PlatformSupport will save around 33% memory bandwidth without mips. For mobiles it's really worth considering. Thanks.