Manual: TexturePacker documentation
GitHub: GitHub - defold/extension-texturepacker: Adds support for the TexturePacker atlas format
We have now added support for packed atlases, via the TexturePacker tool.
Packed atlases refers to the images being tightly packed, using polygonal shapes, in order to fit more images into a single texture page. There are several benefits to this.
- Less overdraw with empty texels (via polygonal shapes)
- Smaller memory footprint on GPU
- Smaller download sizes
We have introduced two new file formats:
- .tpinfo: The data describing the image layouts
- .tpatlas: The data describing the flipbook animations in an atlas
Extension
This is implemented as an editor/pipeline extension (i.e. not runtime), and you’ll need to add the extension to the dependencies
in game.project
.
As usual, pick the latest release from the releases pages.
TexturePacker setup
To keep setup information in one place, we’ll refer to the extension manual on how to set this up.
Data format
While we used TexturePacker as a base implementation, we also intended these new data formats to be used by potential other exporters.
The formats are defined text (using the Protobuf format), and you can find the definitions (.proto) here.
Using these formats, you can write an exporter from other tools, or write your own scripts to generate a packed atlas.
Future
While this support was a heavily requested feature, we realize not everyone can afford a TexturePacker license. So we plan to make similar functionality available to our users within our own ecosystem.
We are currently doing experiments along this route and we hope to do some testing this year.