Author Topic: atlas corruption costing me hours every day.. totally distraught..  (Read 2600 times)

infrid

  • Guest
every single goddamned time I add even one Icon to an atlas ANY atlas it currupts the entire thing.

I then have to recreate the entire atlas, and redo my GUI. I can't be doing this every day. WTH is wrong with it?! How do I rectify it.

Is the problem that I have compression on the final atlas for iphone?

It doesn't matter what atlas I use, I add even on tiny icon and now the resulting atlas has chopped all of the sprites into half, so all my images are stretched and only the top half of any sprite is present.

It's driving me nuts. Please help.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: atlas corruption costing me hours every day.. totally distraught..
« Reply #1 on: May 22, 2013, 09:58:55 AM »
Update to the latest version of NGUI. It prevents you from exceeding the maximum texture size.

Your issue comes from the fact that you are exceeding the max texture size, forcing Unity to shrink the texture.

infrid

  • Guest
Re: atlas corruption costing me hours every day.. totally distraught..
« Reply #2 on: May 22, 2013, 03:20:18 PM »
ok.. this is my texture when I don't have compression on..
http://tinypic.com/r/17zitg/5

And this is it after..
http://tinypic.com/r/1lcg/5

This is my NGUI update status in the asset store..

http://tinypic.com/r/2euiuiu/5

As you can see I am up to date. the texture is only 1024x512..

The simple fact is setting compression breaks the atlas. this is causing my uploads to be mbs's bigger than they need to be.

I really need to rectify this : at the moment I'm sharing pocs' with clients - soon I'll have much richer graphics and a lot more atlases; it's rapidly becoming untenable :(


Tranas

  • Guest
Re: atlas corruption costing me hours every day.. totally distraught..
« Reply #3 on: May 22, 2013, 05:11:03 PM »
What is your max size set to on the atlas?
If you investigate the image of the atlas, you should increase the max size.

I had this problem pretty badly once, but that was because my atlas was building past the max size and corrupting it all.
Which may or may not be your problem.

Our max size of the atlases we use is 4096.
They aren't filled with blank space though to meet that size. The atlas maker will maintain its size ratio as necessary.

You could also just split your atlases into smaller atlases. You shouldn't really need to face that yet since you're only dealing with 1024x512 atlases.
But it might be a short-term fix. Also, it's strange to me that your atlas isn't 1:1. All of our's are.

infrid

  • Guest
Re: atlas corruption costing me hours every day.. totally distraught..
« Reply #4 on: May 22, 2013, 07:23:24 PM »
if you look at the pics you'll see the atlas is only 1024x512. I appreciate your comments; but it doesn't look like that's the issue. it looks like a bug to me. a f***g annoying one at that..

How does one report bugs?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: atlas corruption costing me hours every day.. totally distraught..
« Reply #5 on: May 22, 2013, 09:31:39 PM »
Compression on mobile devices uses PVRTC, which requires the image to be square. If the image is NOT square, Unity will FORCE it to be square, which completely fucks up your atlases as the atlas expects coordinates to remain in pixels.

1. NGUI has an option to generate square-only atlases -- it's a checkbox. Turn off Unity texture packing, and toggle the square texture option.

2. That said, you should not compress your atlases! It looks UGLY when you use PVRTC compression. PVRTC compression has HORRIBLE artifacts, and is not suitable for any kind of UI work. it's meant only for texturing 3D models.

infrid

  • Guest
Re: atlas corruption costing me hours every day.. totally distraught..
« Reply #6 on: May 22, 2013, 09:43:14 PM »
Ok. thanks for the explanation..