Creating 2D sprite atlases for game graphics

Our video game development company runs independent projects, jointly creates games with the client and provides additional operational services. Expertise of our team allows us to cover all gaming platforms and develop an amazing product that matches the customer’s vision and players preferences.
Showing 1 of 1 servicesAll 242 services
Creating 2D sprite atlases for game graphics
Simple
~2 business days
FAQ
Our competencies
What are the stages of Game Development?
Latest works
  • image_games_mortal_motors_495_0.webp
    Game development for Mortal Motors
    663
  • image_games_a_turnbased_strategy_game_set_in_a_fantasy_setting_with_fire_and_sword_603_0.webp
    A turn-based strategy game set in a fantasy setting, With Fire and Sword
    859
  • image_games_second_team_604_0.webp
    Game development for the company Second term
    490
  • image_games_phoenix_ii_606_0.webp
    3D animation - teaser for the game Phoenix 2.
    533

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

  1. Asset audit — list all sprites, sizes, formats, atlas presence
  2. Grouping — distributing sprites into atlases by one draw call rule
  3. Packing — TexturePacker with correct parameters for platform
  4. Compression format — setup for iOS/Android/PC
  5. Integration — import to engine, Sprite Atlas setup, draw call check (Frame Debugger)
  6. 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.