Author Topic: Multiple Atlases for SD and HD  (Read 2903 times)

itszander

  • Guest
Multiple Atlases for SD and HD
« on: September 10, 2012, 08:07:46 AM »
Hi all,
I'm transitioning my team over to nGUI and have a few questions. I've been polling through the FAQ and forum but have not found the answer to my questions yet. If they're out there I'd appreciate knowing where!

OK:

I have a complex UI in development that will deploy on iOS HD and SD. Multiple panels, lots of art, lots of NPC Art, etc. My questions are:

1. When using the SD and HD atlases, do the atlases need to contain exactly the same png files? For instance, I've made a HUD Atlas that contains 43 unique png files for SD. It's 1024x2048 (with a TON of empty space). My HD Hud Atlas contains the same 43 unique png files at HD rez @ 2048x2048 (and there's very little empty space). Do I need to make sure that the atlases contain exactly the same pngs and if so would I have a bunch of different atlases at SD for groups of pngs (panels, NPC Art, HUD, Store+Inventory) that mirrors exactly the same HD art?

2. If I use multiple Atlases (panels, HUD, Store/Inventory) how can I switch between SD and HD. I've watched the video on this topic (http://www.youtube.com/watch?v=ARfmGCMbJr8) but it deals with one texture and one font atlas only. I imagine I'd have multiple texture atlases for HD.

3. I *think* I am seeing a bug but it could be user error. When I follow the above tutorial I create the reference atlas, make a prefab out of it, and then notice that the atlas type reverts from Atlas Type Reference to Normal.  And, if I swap the Coordinates to Tex Coords, then these also revert to pixel.

I've tried to comb through the documentation but remain stumped. Help please!

-zander

itszander

  • Guest
Re: Multiple Atlases for SD and HD
« Reply #1 on: September 10, 2012, 08:10:41 AM »
Update:
I believe it was my error on the HD SD reference Atlas. I've since made changes to the UIAtlas in the hierarchy and applied this to the Project. And, looks like the Atlas type is fixed to reference and calling the correct atlas.

(sorry!)

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Multiple Atlases for SD and HD
« Reply #2 on: September 11, 2012, 02:32:15 AM »
In general you would want to have a 1:1 corrolation between your SD and HD atlas. That means, if you want multiple high res atlases for whatever purpose, you should have the same number of SD atlases, and have the same sprites in respectively.

That said, you CAN have different sprites in specific atlases - I've had a few sprites that I needed in super high res, which I just put in the regular HD atlas and had a special script handling changing that individually instead of on a reference atlas basis.. When you do this, you want to be careful though. :D