Search Unity

Sprite Packer weird sizing?

Discussion in '2D' started by mog-mog-mog, Nov 14, 2016.

  1. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    Unity 5.4.2 pro + Sprite Packer
    Sprites : FULL RGB game background maps (no-alpha)
    Platform: Android/IOS
    IOS: only support POT square atlas


    I have two sprites of size 512x1024 which am packing into one sprite atlas using single tag.
    Instead of creating one sprite atlas of 1024x1024. Unity is creating 2048x1024 atlas on android and 2048x2048 on ios which is doubling the size.
    I've tried all three packing policy and different sprite import setting but nothing work.

    If I pack two 1000x500 sprites, it does pack in 1024x1024 atlas.

    How can I simply pack two maps of size 1024x512 into one 1024x1024 atlas which works on ios as well?

    atlas with 512x1024 sprites in ios become 2048x2048
    512x1024.png


    Atlas with two 500x1000 image packed into 1024x1024 on ios
    500x1000.png

    What should be ideal game background/map size to effectively compress on both mobile platforms?
     
    Last edited: Nov 14, 2016
  2. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    Ping, any help please !!!!!
     
  3. SimteractiveDev

    SimteractiveDev

    Joined:
    Jul 9, 2014
    Posts:
    97
    I don't use sprite packer, but other packing software usually add a padding value of 1 or 2 pixels around the border of all sprites, so this would push you over the 1024 x 1024 limit. I'm not sure if Unity lets you adjust this padding value, but the software package I use, TexturePacker, does. Although, removing the padding may lead to bleeding effects, but I've never tried it.