Author Topic: Best use of Atlases?  (Read 8508 times)

DevMan5000

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 22
    • View Profile
Best use of Atlases?
« on: October 14, 2014, 07:10:51 PM »
Hi,

I am making a story book app. Essentially each page will contain an iPad4 size (2048x1536) image. There will also be text.

How would you guys implement this in regards to Atlases?

Should each page be its own atlas? So 30 pages would mean 30 atlases?

Should each of these Atlases be in a Resource folder and loaded dynamically at run-time?

Thanks!

IIIHAPPYIII

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 7
    • View Profile
Re: Best use of Atlases?
« Reply #1 on: October 15, 2014, 10:38:35 AM »
No need to make an atlas if it is the only image taking it up. You wouldn't be reducing any draw calls. Use UITexture instead and load them in from resources folder. For whatever UI you have, you can build an atlas out of that.

DevMan5000

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 22
    • View Profile
Re: Best use of Atlases?
« Reply #2 on: October 15, 2014, 07:38:22 PM »
Ok, yeah, I guess that makes sense.

However, my textures will be 2048x1536. I was thinking that it would be good to use the atlas so that it would force it into a square texture, but the padding wouldn't need to be part of my texture per se. You see, I am working with a mac and targeting iOS which requires square textures.

Here are the options I see:
- Put the non-square texture into an a square atlas
- Stretch out my source image vertically so it takes up a square texture and then squash it back down once in game.
- Pad the source image with 0 alpha from 1536 to 2048.

What would you all do in this situation?

Agent_007

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 5
  • Posts: 27
    • View Profile
Re: Best use of Atlases?
« Reply #3 on: October 16, 2014, 04:16:21 AM »
You shouldn't use atlases larger than 2048x2048 with iOS since they won't work with all devices. So don't try to put multiple 2048x1536 textures to atlas if you target iOS.

And if you have to use PVRTC texture compression, then add black/transparent borders to image manually. That way you can control the cropping better than when engine does forced square texture scaling.