Skip to content

Syrus212/Spritesheet_Rearranger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Spritesheet_Rearranger

More advanced guide on how to use this here.

You must have Python installed. It can be downloaded here.

You must first install some packages before using this tool : open command prompt and type those commands :

pip3 install opencv-python
pip3 install pillow
pip3 install tk
pip3 install numpy
pip3 install easygui

If these commands do not work, try replacing pip3with simply pip.

Make sure both .pyfiles are in the same directory.

Right click the main.pyfile and click Edit with Idle. Then from the top menu click Run and choose Run Module. Select the spritesheet you want to clean up. The rearranged spritesheet will be called Result.pngand will be placed in the same directory as the source file.

Anchor model :

Anchor model

Note for the team : the current spritesheets contain every single body part within them. This only needs to have each body part variations inside one image (so for example if you have several sprites for the feet, create one image with every foot variation inside) and give it to the program.

Note 1 : the sprites are ordered based on the upper-left hand corner of each sprite's bounding box. They are ordered from left to right and if two sprites have their corner on the same X coordinate from top to bottom.

Note 2 : for spritesheets with multiple rows (like color variations, eyes...), create the spritesheet for each row separately and then assemble the full spritesheet by hand. This tool can't guess which sprites are supposed to be on a row and which sprites aren't.

Troubleshooting : if you don't get the expected result, try adding a layer below the sprites, adding a plain background color and then erasing it before flattening the image. If black sprites don't seem to show up correctly, try lightening them by a small amount. Pitch black sprites will not work with this tool. If you still encounter issues, try and see if there is any non transparent pixel in the image (each group of at least 1 pixel adjacent to other pixels is considered its own sprite and could mess up the program).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages