Skip to content
Texture Atlas Generator/Packer written in Java using a single source file.
Branch: master
Clone or download

Latest commit

lukaszdk Merge pull request #1 from DenizPiri/master
Added padding and ignorePaths parameter
Latest commit 98b9cbe Mar 25, 2012


Type Name Latest commit message Commit time
Failed to load latest commit information. Added unit texture coordinate generation Mar 25, 2012
README.textile Updated formatting in readme Apr 18, 2011


Texture Atlas Generator

A texture atlas generator/packer written in one single Java file. Currently it only supports loading and saving of PNG textures, this can easily be extended to other formats supported by Java’s ImageIO class.

Besides the texture atlas, a .txt file is also generated with texture coords for all the textures.

Examples and further details are available at my website

The texture packing algorithm used in the atlas generator is the Lightmap Packing Algorithm by Black Pawn. The images are added to the atlas by area size (width x height), in descending order.

The source code for this application is released into the Public Domain.




AtlasGenerator <name> <width> <height> <directory>


AtlasGenerator atlas 2048 2048 images

This will take all the PNG files in the images directory next to application and pack them into one or more 2048×2048 atlases named “atlas1.png” to “atlasN.png”, where N is the number of atlases generated. More than one atlas is generated if the PNG textures do not fit into one atlas.

You can’t perform that action at this time.