Users browsing this thread: 1 Guest(s)
2D Sprites : Texture Atlas Inconsistancy?
#7
The problem with the sheet is that although the sprites seem to be sorted well, he sheet's size is basically cropped to snugly fit the sprites, rather than their bounding boxes. Each edge touches at least one pixel. This means that the dimensions are a bit off and so you can't straight up calculate the size.

What I did was what you did, and then just kinda fiddled with the numbers, basically until they looked right. As you noted this stuff doesn't work with floats, and since we're talking about pixels it needs to be an integer (there's no such thing as half a pixel). What I did was use the grid in GIMP, which you can show with View -> Show Grid and configure with Image -> Configure Grid. (It can also be snapped to using View -> Snap to Grid.) I tried some numbers until it seemed about right and ended up with 50x50. I also had to put the width offset to -4 and the height offset to -8 (this is equivalent to adding 4 pixels to the left of the image and 8 pixels to the top). I'm not sure if this is the actual bounding box size but it seems good, none of the sprites are cut off and these can probably be used fine for animation purposes.


It appears that's wrong. I've kept it striked out for informative purposes, since that was my initial process, but after closer inspection it seems these sprites aren't actually equally spaced or aligned. For instance look at the sprites in second row, 5th and 6th column. They're identical except for the fire on his shoes. If you take one using the grid and overlay it onto the other one, aligning with the grid, you'll see that they don't match.

It might be the case that I just don't know the game very well and these frames are in fact supposed to differ in bounding box position, but it looks to me like they're not properly spaced. If that is the case then I'm afraid the only solution is aligning them yourself so that they animate well.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply
Thanked by: spritakas


Messages In This Thread
RE: 2D Sprites : Texture Atlas Inconsistancy? - by puggsoy - 01-24-2017, 03:45 AM

Forum Jump: