Author Topic: Atlases not holding as much as they could?  (Read 2995 times)

samurai413x

  • Guest
Atlases not holding as much as they could?
« on: June 11, 2012, 04:43:29 PM »
So I'm starting off with a 2048x2048 atlas (I don't want to use anything larger) with two different window sprites:



Notice there is still plenty of room on the right side (around 150 pixels of width).

Then I try to add this 32x1536 gradient strip to tile as a background, and it acts like there is not enough room for it:



Anyone know why it can't fit all three?

Side Note: Is 32 pixels not wide enough for that gradient strip?  I get Unity warnings about it occasionally, but it seems to work once I tweak the location on the atlas a little bit.


Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Atlases not holding as much as they could?
« Reply #1 on: June 11, 2012, 06:42:04 PM »
I'm not sure why it's making the atlas so malformed. Might be a bug.

A gradient strip can be 3px wide, if you stretch the width anyway. Use a sliced sprite and put a 1px border on each side.

PhilipC

  • Guest
Re: Atlases not holding as much as they could?
« Reply #2 on: June 11, 2012, 07:40:15 PM »
I have spoken with Mike and he says that this is more of a Unity issue. The issue happens when Unity tries to pack long thin sprites (unfortunately). You could always make the sprite wider or shorter.