- Home /
Why don't four 512x512 images atlas into one 1024x1024?
Using the atlasing system in 2017 I've been able to save a massive amount of texture memory and draw calls, but one thing that still gets me is that the packing seems to have some indeterminate amount of padding that can't be overridden.
The Problem: I have four 512x512 sprites, which i expect to atlas into one 1024x1024 image. However, they will default to a 2048x2048. If I set the max texture size to 1024, they will create four useless 512 atlases
The Question: Is there a way to get them into one 1024x1024 atlas?
Answer by hexagonius · Aug 17, 2017 at 05:20 PM
According to the docs, the minium achievable padding with the packer is 2 pixels:
https://docs.unity3d.com/ScriptReference/Sprites.AtlasSettings-paddingPower.html
But in your case, the packer might not be the right tool to choose from. Since you have perfectly sized textures, why don't you merge them with e.g. Photoshop or even MS Paint?
That's a good point. It didn't occur to me to use a mixed workflow of Unity-atlased sprites and handmade ones, though in retrospect it seems obvious.
I guess the annoying part still remains that if you clamp a texture size using the max size setting, it will still add that padding. e.g If you had four 600x500 sprites and wanted to clamp them to 512, they would still use a 2048 texture sheet. $$anonymous$$aybe I should just be more careful in my setup.
Your answer
Follow this Question
Related Questions
Is there a behind the scenes texture atlas? 2 Answers
Unity 2018.2.[1,2]f1 - Introduced artifacts to UI sprites at runtime 2 Answers
Sprite with Multiple mode VS 2017 Sprite Atlas 0 Answers
Atlas Building 0 Answers