Skip to content

If TexturePacker creates more than one atlas, it does not trim them individually to the correct size. #171

@caglarenes

Description

@caglarenes

Hello. When a texture pack has to create multiple atlases, it only uses the size of the first (or bigger) atlas as the size for all other atlases. Even if there is trimable space in other atlases, it does not trim them. This is more obvious in @0.5 outputs.

I don't know every pipeline, but generally, there is no requirement for all the atlases to be the same size. After completion, the texture atlases can be trimmed again. Generally the last atlas uses more space than the needed but if the animation is size-complicated, the wasted area can be huge.

I created an example animation and project for demonstration. You can build it and investigate the atlases.
https://github.com/caglarenes/texturepackertest

For example test-0.png is 2045x2046. It uses all the area of the resolution.

Image

But the test-9.png is also 2045x2046. Not using all the space allocated to them. And it can be trimmed to 1906x1633. There are little more atlasses like that.

Image

Another example: [email protected] is 1025x1025 like all other @0.5's and can be trimmed to 505x502. Almost half of the @0.5's can be trimmed.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions