C++ texture atlas generator
HTML C++ Shell Other
Latest commit fbe1bdf Aug 29, 2015 @bivory Merge pull request #1 from metiscus/master
Fixed linux build
Failed to load latest commit information.
png++ Initial Commit Sep 5, 2010
tclap Added the TCLAP library. Sep 5, 2010
texturepacker Fixed linux build Aug 26, 2015
.gitignore Initial Commit Sep 5, 2010
CMakeLists.txt Fixed linux build Aug 26, 2015
LICENSE Initial Commit Sep 5, 2010
README Added a better example to the README Sep 6, 2010
main.cpp Added deletes Sep 6, 2010

README

=== About ===

This is a simple command line tool that takes a list of PNG image files and creates a somewhat optimized texture atlas. It might rotate images if that will allow the texture atlas to be smaller.



=== Usage ===

USAGE:
   ./texture-atlas  [-i <string>] ...  [-q] [-y <pixels>] [-x <pixels>] [-o
                    <string>] [--] [--version] [-h] <PNG file path> ...

Where:
   -i <string>,  --info_writers <string>  (accepted multiple times)
     Atlas information writers: csv

   -q,  --quiet
     Suppress processing information output.

   -y <pixels>,  --out_height <pixels>
     Maximum output atlas image's height.

   -x <pixels>,  --out_width <pixels>
     Maximum output atlas image's width.

   -o <string>,  --out_name <string>
     Output atlas image's file name.

   --,  --ignore_rest
     Ignores the rest of the labeled arguments following this flag.

   --version
     Displays version information and exits.

   -h,  --help
     Displays usage information and exits.

   <PNG file path>  (accepted multiple times)
     (required)  List of the image filenames.


   Creates a texture atlas from a list of PNG files.

Ex:
Packing three images that are 128x128, 64x64 and 256x256 to 256x256 pixel texture atlases.

$ ./texture-atlas -i csv -x 256 -y 256 image/asteroid.png image/asteroid_mineral.png image/sun.png

Packed 2 images to out_atlas_0.png with 12288 unused area Width (128) x Height (256)
image/asteroid.png => x: 0 y: 0 width: 128 height: 128
image/asteroid_mineral.png => x: 0 y: 128 width: 64 height: 64

Packed 1 images to out_atlas_1.png with 0 unused area Width (256) x Height (256)
image/sun.png => x: 0 y: 0 width: 256 height: 256


$ cat out_atlas.csv
atlas_name, atlas_packed_count, atlas_wasted_pixels, atlas_width, atlas_height, texture_name, texture_rotated_90, texture_width, texture_height, texture_x_offset, texture_y_offset
out_atlas_0.png, 2, 12288, 128, 256, image/asteroid.png, 0, 128, 128, 0, 0
out_atlas_0.png, 2, 12288, 128, 256, image/asteroid_mineral.png, 0, 64, 64, 0, 128
out_atlas_1.png, 1, 0, 256, 256, image/sun.png, 0, 256, 256, 0, 0



=== License and Acknowledgements ===

The files in png++ are from the png++ project hosted at http://savannah.nongnu.org/projects/pngpp/ and licensed under a modified BSD license. See the file png++/COPYING for more details.


The files in the texture-atlas directory are from John Ratcliff's Texture-Atlas library: http://code.google.com/p/texture-atlas/ and is licensed under the MIT License. This library is based on this paper: http://www.antisphere.com/Research/Tiles.php


The files found in the tclap directory are from the Templatized C++ Command Line Parser Library hosted at http://tclap.sourceforge.net/ and is licensed under the MIT License.


The code not found in those directories is written by Bryan Ivory and licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php