Sprite sheet padding on import #78

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

Comments

Projects
None yet
3 participants

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 added this to the v1.1 milestone Nov 21, 2014

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 added the export label Mar 18, 2015

dacap self-assigned this Mar 19, 2015

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

dacap removed the export label Nov 17, 2015

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

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