2D Sprite Atlas Creation
Sprite Atlas is one of the few optimization tools in 2D development that simultaneously affects rendering performance and load speed. Ten separate sprites in folder — ten texture bindings during rendering. Same ten sprites in one atlas — one binding. On mobile device the difference in draw calls between "without atlases" and "with proper atlases" — 3–10×.
But atlas is not simply "combine textures into one big." Improperly made atlas gives artifacts, memory waste, and doesn't reduce draw calls as it should.
Technical foundation: TexturePacker
TexturePacker is the industry tool for sprite atlas creation. Supports all current engines: Unity, Godot, Cocos2d, Phaser. Key settings determining atlas quality:
Algorithm. MaxRects BestShortSideFit — best packing for most projects (maximum texture space usage). Basic — faster but worse packing. For production atlases — MaxRects.
Padding. Distance between sprites in atlas. Without padding — bleeding artifacts: rendering sprite captures pixels of neighbor. Standard: 2px padding. With mipmaps — 4–8px (mipmaps blend neighbor pixels at lower levels).
Rotation. Allow TexturePacker to rotate sprites 90° for better packing. Engine must support this (Unity Sprite Atlas — yes, some old engines — no).
Power of Two. Final atlas must have dimensions powers of two: 512×512, 1024×1024, 2048×2048. GPUs cache power-of-two textures efficiently. Non-standard size (e.g. 1000×800) on some GPUs leads to automatic upscale to nearest power-of-two — memory waste.
Grouping sprites into atlases
Most important decision: which sprites combine into one atlas.
One draw call rule. One atlas combines sprites rendered simultaneously. Main menu UI elements — one atlas. One character animation frames — one atlas. One biome tiles — one atlas. Mixing UI, characters, tiles in one "common" atlas — anti-pattern: increases texture size without reducing draw calls.
Atlas size limit. 2048×2048 — safe maximum for mobile. 4096×4096 supported on most modern Android/iOS devices, but exceptions exist (old budget Android). Exceeding device's maximum texture size = crash or degraded fallback.
Animation atlases. Sprite-list (all animation frames in one atlas) — standard for frame-by-frame animations. TexturePacker Sprite Sheet Export creates atlas + JSON/XML with coordinates. Unity Sprite Editor reads this JSON through Custom Physics Shape or automatic Sprite Editor slicing.
Texture compression formats
Texture storage format in atlas — critical performance choice:
| Platform | Format | Features |
|---|---|---|
| iOS | ASTC (4×4 or 6×6) | Best quality/size for iOS A8+ |
| Android (modern) | ETC2 (RGB) / ETC2 RGBA | GLES 3.0+, 95%+ devices |
| Android (legacy) | ETC1 + separate alpha | Very old devices |
| PC/WebGL | DXT1 / DXT5 | Desktop standard |
| Universal | RGBA32 | No compression, max quality, max size |
RGBA32 for final production build — mistake. 2048×2048 RGBA32 = 16MB video memory. Same texture in ASTC 4×4 = 2MB. Multiply by atlas count in game = memory problem on mobile.
Unity Platform-specific overrides in Texture Importer allow different formats for iOS and Android without asset duplication.
Atlas in Unity: Sprite Atlas Asset
Unity Sprite Atlas (since 2017+) — native tool without plugins. SpriteAtlas asset created in Project → Create → 2D → Sprite Atlas. Folders or individual sprites added to Objects for Packing. Unity auto-packs on build.
Important nuance: sprites must have Packing Tag or be added directly to Sprite Atlas — otherwise packed as separate textures. Mixing atlased and non-atlased sprites in one UI Canvas — breaks draw call.
Late Binding (Unity 2020+): atlas loaded only on first use of contained sprite, not at scene start. Critical for large games with many atlases — lowers initial scene load time.
Common artifacts and causes
- Bleeding (edge pixelization): padding = 0 or mipmaps without increased padding
- Empty atlas space (>20%): suboptimal packing algorithm or incompatible sprite sizes
- Draw calls unchanged: sprites from different atlases in one Canvas or render batch
- Rotation artifacts: engine doesn't support rotation but TexturePacker enabled it
Work stages
- Asset audit — list all sprites, sizes, formats, atlas presence
- Grouping — distributing sprites into atlases by one draw call rule
- Packing — TexturePacker with correct parameters for platform
- Compression format — setup for iOS/Android/PC
- Integration — import to engine, Sprite Atlas setup, draw call check (Frame Debugger)
- Profiling — before/after atlases, confirming draw call reduction
| Scale | Timeline |
|---|---|
| Audit and restructure existing atlases | 2–5 days |
| Create full atlas set for new project (up to 500 sprites) | 1–2 weeks |
| Optimization + platform format setup + docs | 2–4 weeks |
Cost determined by asset volume and supported platform count.





