05-04-2020, 05:09 PM
(This post was last modified: 05-04-2020, 05:11 PM by rufaswan.
Edit Reason: code typo
)
Quote:Grabbed a random monster and put it in Sheet Maker. Is there are a reason why the boxes for each frame have a different size?
I don't have the sprite width and height before creating the canvas, so I set it to something really high, like 768x768. Then I trimmed off the excessive space around the sprite.
Regardless what is the frame size, the center of the frame is the center point 0,0 . If you align every frame to this point, you can animate them correctly.
Is there any gravity option in Sheet Maker to center them? montage (from ImageMagick) have "-gravity center" option to center the frame.
If the space is bothering you, you can use mogrify -trim to (blindly) remove them.
http://www.imagemagick.org/Usage/montage/#controls
http://www.imagemagick.org/script/comman...s.php#trim
Here are the commands and the result
Code:
# blindly remove empty borders from the image (like "Autocrop Image" on GIMP)
mogrify -trim +repage -strip 0*.png
# tiled all images into 8-columns and save it as "sheet.png"
montage -geometry '1x1<' -background none -tile 8x -gravity center -stripĀ 0*.pngĀ sheet.png
As you can tell, the sprites is no longer aligned. They are not at the same floor level anymore.
But this would be what I'll do when making a spritesheet. You guys can do a better job than me.
Take care,
- Rufas