Hello Guest

Author Topic: Atlas quality problem on iOS platform  (Read 12509 times)

vinnie035

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 20
    • View Profile
Atlas quality problem on iOS platform
« on: April 05, 2012, 04:29:15 pm »
As you can see on the attached screenshot, the larger size i use for the Atlas texture, the uglier the sprites are becoming.
This behavior happens when the selected platform is iOS but if I switch to PC/MAC, the quality remains the same whatever Atlas size is used.
I'm using Unity 3.5 with the latest 2DTK release 1.60 patch1 with following settings:
Target Height : 768
Target Ortho Size : 1
Orthographic Camera Size : 384

I tried with different settings but always I ended with the same behavior.
I checked the quality settings too and the texture is set to full resolution on each platform.
I also checked the Atlas generated by 2DTK, but it looks perfect, whatever its size. It seems that the problem is only affecting the sprites display.
« Last Edit: April 05, 2012, 04:31:02 pm by vinnie035 »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Atlas quality problem on iOS platform
« Reply #1 on: April 05, 2012, 07:34:31 pm »
What parameters were used for this? Also does this happen within the viewport when iOS is selected as the platform? Also, why are there "tile" outlines in your image?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Atlas quality problem on iOS platform
« Reply #2 on: April 05, 2012, 07:35:15 pm »
What parameters were used for this (dicing / multiatlas / etc)? Also does this happen within the viewport when iOS is selected as the platform? Also, why are there "tile" outlines in your image?

vinnie035

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Atlas quality problem on iOS platform
« Reply #3 on: April 05, 2012, 07:45:58 pm »
What parameters were used for this (dicing / multiatlas / etc)? Also does this happen within the viewport when iOS is selected as the platform? Also, why are there "tile" outlines in your image?

Only dicing is used. No multiatlas... Look at the screenshots for more info.
And what you're calling the "tile" outlines is the grid in the scene editor.
« Last Edit: April 05, 2012, 07:47:35 pm by vinnie035 »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Atlas quality problem on iOS platform
« Reply #4 on: April 05, 2012, 09:20:37 pm »
This is really puzzling. I tried it on my MBP, but what I'm seeing is when a texture is 4096x4096, it seems to be downscaled to 2048x2048 when in iPhone build mode, otherwise it displays correctly, when it works.

Can you check a few things just to rule things out -
1. On the atlas texture, the max size is 4096 and there are no platform overrides for whatever platform.
2. In edit > project settings > quality settings the texture quality is "Full Res" (You have mentioned this before, but just checking in case)
3. Can you drag the texture onto a cube and see if you see the same results - you should, as I did above too.

If this is whats happening, then this could be a bug / known issue in Unity.

vinnie035

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Atlas quality problem on iOS platform
« Reply #5 on: April 05, 2012, 10:59:35 pm »
I did everything you said (no platform texture override, full res, applied the atlas texture onto a cube), and I got the same result.
It seems that the larger texture size you use, the more it is displayed downsized.

So, if I understand well, this issue is not related to 2DTK but to Unity...

It would be interesting to know if this bug was already happening in previous Unity releases. I never noticed it before, but I never used textures larger than 1024 pixels wide before. So, I can't really say...
« Last Edit: April 05, 2012, 11:03:00 pm by vinnie035 »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Atlas quality problem on iOS platform
« Reply #6 on: April 05, 2012, 11:10:32 pm »
I usually limit my atlases to 1024 too so I've not really seen this issue before. I will investigate this further later, but its probably worth mentioning it in the Unity support forums - the case with the cube and just one texture is good enough really, as it illustrates the problem.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Atlas quality problem on iOS platform
« Reply #7 on: April 05, 2012, 11:11:43 pm »
I should also mention that Unity fails transparently when you use a texture larger than the platform supports (you end up with a black texture on iOS / Android). Eg, 2048 texture on iPhone 3G, 4096 texture on iPhone4, etc. This only happens on the target device.

vinnie035

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Atlas quality problem on iOS platform
« Reply #8 on: April 06, 2012, 09:32:02 am »
I tried to switch from PC/MAC to iOS with Unity 3.4.2 and I got the same issue too.
So this issue is not related specifically to Unity 3.5. I don't have any older version to check if this behavior always happened.

Unfortunately it seems we'll have to stick to 1024 textures on iOS until a workaround or a real solution is found by the Unity team.
I'm gonna post a message on Unity Support forum...