Hello Guest

Author Topic: too many textures for atlas size when adding platforms  (Read 3255 times)

sebastian

  • Newbie
  • *
  • Posts: 17
    • View Profile
too many textures for atlas size when adding platforms
« on: August 20, 2014, 04:52:56 am »
Hi-- had a follow up question on adding platforms.

I had everything working perfectly with large resolution textures in tk2d.

Now I realize I need some lower rez platform specific sprites and am implementing @2x and @1x textures.

However, when trying to commit some of these tk2d collections I'm suddenly getting "Unable to fit textures in requested atlas area.  There are too many textures in this collection for the requested atlas size."

Can you explain to me why this would be?  Odd given that the large platform sprite sheets built and worked fine.

I've found that if I add dicing to my sprites I can work around this error.  However, I'd like to avoid dicing if possible-- plus everything was all set up and working nicely at @4x.

Is there a reason that adding smaller resolution platforms with smaller textures requires dicing to fit, while the large textures fit fine without the smaller platforms?

Thank you for your help!
Sebastian

sebastian

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: too many textures for atlas size when adding platforms
« Reply #1 on: August 20, 2014, 06:02:36 am »
Okay I answered my own question-- I think.

Turns out when I resized my textures in photoshop, I guess it left some sort of non zero alpha edge around the entire border of the texture.  so tk2d wasn't trimming the images since it saw this edge and basically interpreted each image as a big box.

So even though my artwork was smaller, since it was trying to pack the whole canvas of the art, it ended up being larger.

I'm currently going back into photoshop and cropping 2 pixels off the edges and that seems to be doing the trick.

Thanks.