Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combining --trim and --sheet-pack causes sprite overlap #2020

Closed
DragonDePlatino opened this issue Feb 21, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@DragonDePlatino
Copy link

commented Feb 21, 2019

I'm storing all of my sprites in separate .ase files and I'm pulling them onto an atlas whenever I compile. I'm already using --sheet-pack but I'd like to save more space with --trim. The problem is that when I enable both at once, sprites aren't being packed properly.

When I use just --sheet-pack, my atlas looks like this:

sprite_notrim

This is fine, but there's a lot of wasted space. Especially with large sprites like the flash at the top. If I enable --trim --sheet-pack, now my atlas looks like:

sprite_trim

The sprites are being trimmed but they're covering each other up and hanging off the sides of the texture. As an experiment, I tried just --trim to see if it worked by itself:

sprite_nopack

So I can get just --sheet-pack or just --trim to work, but not both at once. Here is my sprite makefile for reference:

ASEPRITE = "C:/Program Files/Aseprite/Aseprite.exe"
ATLAS = sprite.bmp
DATA = $(ATLAS:.bmp=.json)

ASE = $(wildcard *.ase)
SIZE = 512

sprite:$(ATLAS)

$(ATLAS):$(ASE)
	$(ASEPRITE) -b $(ASE) --sheet $@ --trim --sheet-pack --sheet-width=$(SIZE) --sheet-height=$(SIZE) --data $(DATA) --list-tags --list-slices

.PHONY: clean
clean:
	@rm -f $(ATLAS) $(DATA)

@dacap dacap added the bug label Feb 23, 2019

@dacap dacap added this to the v1.x-bugs milestone Feb 23, 2019

@dacap

This comment has been minimized.

Copy link
Member

commented Apr 13, 2019

Fixed with 5d5aae7

@dacap dacap closed this Apr 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.