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

Sprite sheet padding on import #78

Open
aseprite-bot opened this Issue Aug 20, 2014 · 1 comment

Comments

Projects
None yet
3 participants
@aseprite-bot

aseprite-bot commented Aug 20, 2014

From Eiye...@gmail.com on February 21, 2012 13:48:52

What do you need to do? I think thzt adding padding to import sprite sheet would be useful. Some tile sheets add spaces between sprite, and thus, importing them with the space is quite annoyant. How would you like to do it? Adding two input boxes to define space width/height would be perfect, don't you agree?

Original issue: http://code.google.com/p/aseprite/issues/detail?id=78

@dacap dacap added this to the v1.1 milestone Nov 21, 2014

@gcmartijn

This comment has been minimized.

Show comment
Hide comment
@gcmartijn

gcmartijn Mar 14, 2015

I'm busy with a small game framework using your console command for creating the atlas.
What game programmers need is a 1px padding around each frame.
Sounds weird, but as the documentation say

Import note: When creating an image atlas or an image containing multiple animation frames, it is a good idea to add a single pixel border around each frame that extends the pixels at the edges of the frame. This will prevent rendering 'noise' caused by accidental fetches of pixels outside the frame, which can sometimes occur due to mathematical inaccuracies.

And I had that problem, but solved it by adding 1px padding by hand.
command option: --add-padding:1px

EDIT:
And the option to do only horizontal atlas:
Because some game frameworks say ;)
Multiple frame images are assumed to be laid out in a horizontal strip, in which case width and height are the dimensions of each frame, and the source image must be wide enough to contain the entire strip.
EDIT2:
Sorry there is a --sheet-height=512 --sheet-width=512 already...

Less important, but its cool if its supported
http://gamedev.stackexchange.com/questions/26187/why-are-textures-always-square-powers-of-two-what-if-they-arent

Android definitely seems much more stable (at least on older devices) with power-of-2 size images.
And at least one device I've tested (HTC Hero / G2 Touch) refuses to load 1024x1024 images (512x512 may be max).

gcmartijn commented Mar 14, 2015

I'm busy with a small game framework using your console command for creating the atlas.
What game programmers need is a 1px padding around each frame.
Sounds weird, but as the documentation say

Import note: When creating an image atlas or an image containing multiple animation frames, it is a good idea to add a single pixel border around each frame that extends the pixels at the edges of the frame. This will prevent rendering 'noise' caused by accidental fetches of pixels outside the frame, which can sometimes occur due to mathematical inaccuracies.

And I had that problem, but solved it by adding 1px padding by hand.
command option: --add-padding:1px

EDIT:
And the option to do only horizontal atlas:
Because some game frameworks say ;)
Multiple frame images are assumed to be laid out in a horizontal strip, in which case width and height are the dimensions of each frame, and the source image must be wide enough to contain the entire strip.
EDIT2:
Sorry there is a --sheet-height=512 --sheet-width=512 already...

Less important, but its cool if its supported
http://gamedev.stackexchange.com/questions/26187/why-are-textures-always-square-powers-of-two-what-if-they-arent

Android definitely seems much more stable (at least on older devices) with power-of-2 size images.
And at least one device I've tested (HTC Hero / G2 Touch) refuses to load 1024x1024 images (512x512 may be max).

@dacap dacap added the export label Mar 18, 2015

@dacap dacap self-assigned this Mar 19, 2015

@dacap dacap changed the title from Sprite Sheet Padding to Sprite sheet padding on import Aug 5, 2015

@dacap dacap removed the export label Nov 17, 2015

@dacap dacap modified the milestones: v1.2, v1.1 Nov 17, 2015

@dacap dacap modified the milestones: v1.3, v1.4 Sep 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment