Author Topic: Atlas Max Sprite Quantity/Texture Size  (Read 5062 times)

DuckOfDoom

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 10
    • View Profile
Atlas Max Sprite Quantity/Texture Size
« on: January 09, 2013, 04:37:32 AM »
I'm having an issue with atlas maker, I couldn't find an appropriate topic for that.

I have texture atlas to which i've been adding stuff for a while and there is still a lot of space left(texture is 2048x2048 and about 1/3 is free) but now, when i try to add something new, every sprite becomes clipped from upper-right corner and sprite coordinates in atlast prefab become inconsistent, pointing to wrong sprites on texture.

I wonder if there is a limit to texture measurements/overall size or to number of elements in atlas(currently 130+ elements)? If there is no simple answer to this, i'll dig in atlas maker script myself later and I can attach some texture samples if needed. I wonder if I'm the only one with this issue.

Also, do texture import settings matter for sprite/atlas in this case?
« Last Edit: January 09, 2013, 04:41:08 AM by DuckOfDoom »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Atlas Max Sprite Quantity/Texture Size
« Reply #1 on: January 09, 2013, 03:47:55 PM »
Try using the built-in texture packer instead of Unity's (it's a checkbox option).

Also I suggest eliminating long / narrow sprites. They don't pack well. Use sliced sprites wherever possible.

DuckOfDoom

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 10
    • View Profile
Re: Atlas Max Sprite Quantity/Texture Size
« Reply #2 on: January 10, 2013, 04:32:51 AM »
Also I suggest eliminating long / narrow sprites. They don't pack well. Use sliced sprites wherever possible.

I'm using sliced sprites but there are some gradienty bacgrounds where I have to preserve designer's complex gradient. Maybe I should look into some solution to make it in code.

Can you please explain why long/narrow sprites don't pack well? (If it won't take long, I'm just curious)

Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Atlas Max Sprite Quantity/Texture Size
« Reply #3 on: January 10, 2013, 01:14:11 PM »
Ask Unity's texture packer. :)

It just seems to treat their dimensions as square... ie: if you have 1000x10 sprite, it will treat it as a 1000x1000 for atlas creation, meaning your atlas will be 1024x1024 instead of 1024x16.