Hello Guest

Author Topic: Retina iOS Dicing Artifacts  (Read 6963 times)

alomo

  • Newbie
  • *
  • Posts: 6
    • View Profile
Retina iOS Dicing Artifacts
« on: May 12, 2014, 07:11:43 pm »
We're running into an issue where on retina iOS devices we're seeing some dicing artifacts. These don't show up in the editor or on other (high enough to be retina) devices. I've attached a comparison of a Nexus 4, where the sprites look correct and continuous, and on an iPhone 4 where there are some clear lines created between where the mesh is diced. These artifacts also show up on the iPad 3.

Has anyone seen anything else like this before? The source textures are not pixel perfect and we are using the .png atlas format...



Thanks!
Adrian
« Last Edit: May 12, 2014, 07:14:38 pm by alomo »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Retina iOS Dicing Artifacts
« Reply #1 on: May 14, 2014, 01:12:37 pm »
Is there anything limiting the max resolution of a texture in Unity (QualitySettings, explicit texture override)? That will be the first place to look - The geometry and textgures should be identical between platforms...

alomo

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Retina iOS Dicing Artifacts
« Reply #2 on: May 15, 2014, 07:45:56 pm »
Thanks for the quick reply!

In Quality Settings, the Texture Quality was set to Half Res but setting it to Full Res didn't change anything... Is there anything else that might be affecting the final texture resolution?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Retina iOS Dicing Artifacts
« Reply #3 on: May 15, 2014, 09:29:41 pm »
What about the tetxure itself, does it have an ios specific setting?

alomo

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Retina iOS Dicing Artifacts
« Reply #4 on: May 15, 2014, 09:59:03 pm »
Not that I can tell.

Here's the source image:


And the generated sprite atlas:
« Last Edit: May 15, 2014, 10:00:37 pm by alomo »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Retina iOS Dicing Artifacts
« Reply #5 on: May 15, 2014, 10:08:52 pm »
 Try it without the png atlas turned on - then load the resultant png into photoshop, does it look correct there? What is the atlas size when running on android?

alomo

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Retina iOS Dicing Artifacts
« Reply #6 on: May 29, 2014, 06:56:43 pm »
Doesn't seem to be a PNG thing. Tried setting the Atlas Format from PNG back to Unity Texture and it looks the same. There's no difference -- dicing artifacts are still there.

Loaded the file in photoshop and couldn't see any issues. It's very difficult to tell with it being diced up.

Could something like this happen if the source art wasn't super high res? Not sure why that would be the case (and iOS specific), but some of these assets are slightly lower relative resolution than others. Specifically the tree in the background is substantially lower resolution than the other assets.

On Android the atlas size is still 2048 x 2048.

I've attached the atlas png from setting it to Unity Texture.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Retina iOS Dicing Artifacts
« Reply #7 on: May 30, 2014, 12:02:59 pm »
I can't really tell from that, but.... one thing that may be worth doing is to switch to point filtering and grab pics from both android and iOS. If there are any differences, we'll see it there. It isn't anything to do with the source files, as you're using the same source files in both platforms. It isn't the atlas either, as that is shared too. It must be something about how its drawing it and hopefully point filtering will make that clearer.

alomo

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Retina iOS Dicing Artifacts
« Reply #8 on: May 30, 2014, 04:25:10 pm »
Here's switched to point filtering. There's these really weird streaks that come in and out whenever you move around. It's super weird... We are using a regular perspective camera here. Not sure if that could be causing any issues? I can try switching it to an orthographic or 2dToolkit camera.



By the way, thanks for all the help so far! This is kind of a messy issue we've been stuck on for a while.
« Last Edit: May 30, 2014, 04:32:45 pm by alomo »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Retina iOS Dicing Artifacts
« Reply #9 on: May 31, 2014, 07:31:38 pm »
Its worth a try with a normal camera if its easy enough to do that. If nothing else, it will rule out z transform precision.

alomo

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Retina iOS Dicing Artifacts
« Reply #10 on: June 02, 2014, 10:32:50 pm »
Yeah, tried an Orthographic camera and a 2DToolkit camera, as well as just pulling down the Far clipping plane to see if it was a depth buffer precision issue, but no effect :-\

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Retina iOS Dicing Artifacts
« Reply #11 on: June 04, 2014, 08:15:27 pm »
I have run out of suggestions. Can you prepare a simple repro case for this? The simpler the better, really.