Search Unity

SpriteAtlas - PackingTextureSize vs MaxTextureSize

Discussion in '2D' started by Foriero, Nov 25, 2019.

  1. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    472
    Hello Unity,

    May I kindly bring your attention to the difference between PackingTextureSize and MaxTextureSize?

    PackingTextureSize, which should be as an option in Packing settings, is size into which all the sprites will be packed. In other words it is our texture no matter how big it is this texture is not going into final build given that MaxTextureSize altering the final output.

    MaxTextrueSize is what unity makes from the PacktinTextureSize.

    It is like with normal texture. I have texture that is 8k and max texturesize tells unity, hey make it small to 2k but keep proportions.

    The issue with current implementation is that we are simply not able to pack all our sprites into MaxTextureSize. I mean we don't want to have 8K texture in the final build. We just need to pack it into 8K and then via MaxTextureSize downsize it for specific platform.

    Does it make sense?

    Thank you, Marek.

    SEE BELOW

    https://www.dropbox.com/s/0woqvhinx5jpavz/packing_texture_size.png?dl=0

    In other words normally it works so that you pack atlas to size you need and then with MaxTextureSize downsize it for particular platform.
     
    Last edited: Nov 25, 2019
  2. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    472
    Just to add to it if it was implemented correctly then we would also see Resize Algorithm as it is for normal texture.

    So again please let us pack into whatever size we need with that Packing Size and then Resize it down if needed with Max Texture Size. I think many 2D devs encountered the same difficulty with current half implementation.
     
  3. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    244
  4. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    472
    I believe that we don't need variants. Variants are only needed if you need other sizes than power of two. In other words why would I need Variants if I pack my sprites into 8K and with MaxSize downsize it for mobile platforms to 4K?

    Variants are only needed if you want for example make 6K from 8K.

    I try to explain this design bug from the beginning of SpriteAtlass existence.

    Why would you complicate things to implement packed texture differently than other textures?

    This flaw is there from the first moment I talked to your team even before SpriteAtlas. Does it make sense?
     
    Last edited: Nov 26, 2019
unityunity