SFML community forums

General => SFML projects => Topic started by: Kharyus on April 27, 2016, 11:30:31 pm

Title: Sprite Sheet Manipulator
Post by: Kharyus on April 27, 2016, 11:30:31 pm
Hello,

I have developed a program that detects sprites' boundaries inside a sprite sheet, and then splits them into separate files. This is particularly useful for fighting games' sprite sheets since they may have no clear pattern to how they are laid out.

It was done using SFML(of course) and TGUI. It currently only works on windows, but I intend to implement Linux support soon. It utilizes the GPL license.

The reason i've decided to do this is because i couldn't find anything like it at the time i needed this. Not too long ago though, I discovered there are other programs like mine in the internet. I've compared another free solution, and could see that mine has considerably better performance with faster loading times, so i guess there's still a reason to keep this project going.

Link to the github page: https://github.com/kharyus/Sprite-Sheet-Manipulator (https://github.com/kharyus/Sprite-Sheet-Manipulator)
If you want to download it, go to the releases tab. There are only the 64 bit binaries right now.

I hope people find this useful. :D

Screenshot:
(https://camo.githubusercontent.com/64e4f1f7c0ed6f3ea232b96d81e1683d84f9b393/687474703a2f2f7333312e706f7374696d672e6f72672f7736346573703465332f5370726974655f53686565745f4d616e6970756c61746f722e706e67)
Title: Re: Sprite Sheet Manipulator
Post by: Mr_Blame on May 07, 2016, 09:02:27 pm
Looks interesting :)

It was always pain for me to cut sprites from spritesheet manually. ;D
Hooray!
Title: AW: Sprite Sheet Manipulator
Post by: eXpl0it3r on May 08, 2016, 08:04:15 pm
Since perfect texture packing is an NP complete problem, what algorithm do you use to pack the sprites?
Title: Re: Sprite Sheet Manipulator
Post by: Mr_Blame on May 08, 2016, 08:43:18 pm
there is a link to source: :D
https://github.com/kharyus/Sprite-Sheet-Manipulator
Title: Re: Sprite Sheet Manipulator
Post by: eXpl0it3r on May 08, 2016, 09:13:25 pm
I have better things to do than figuring it out on my own while the creator can tell me in like 1min. ;)
Title: Re: Sprite Sheet Manipulator
Post by: Sygmei on May 08, 2016, 10:38:33 pm
This software reminds me "Shoebox"  :)
Title: Re: Sprite Sheet Manipulator
Post by: Kharyus on May 24, 2016, 01:24:58 am
Sorry for the delay. This is my first released project, therefore it was very nerve-wrecking putting it online. I'm still waiting for someone to rip apart my code, and call me a dumbass. :P

About texture packing, i think you've misunderstood the purpose of the project. I could even go about writing something to pack the sprites together later, but the main goal was to do the opposite, unpacking them. Why? Because there are many sprite sheets out there without any clear pattern so using them would be extremely painful, and cutting them manually is just not worth the time-investment. With this program, you can remove the sprites into separate files so you can handle them better. I also intend to implement a button to generate a json/xml so that you may still use the sprite sheet without splitting.

Sorry if I've no smart solution or anything, this is just my own implementation on the flood fill algorithm to figure out sprites' boundaries. :P
Title: AW: Sprite Sheet Manipulator
Post by: eXpl0it3r on May 24, 2016, 10:14:48 am
Ah okay, yeah I misunderstood things. That sounds quite useful, especially the future JSON export. :)
Title: Re: Sprite Sheet Manipulator
Post by: Kojay on May 26, 2016, 04:16:48 am
This looks nifty, there's quite a few spritesheets out there that are laid out in a seemingly haphazard manner  :(
Title: Re: Sprite Sheet Manipulator
Post by: Kharyus on May 26, 2016, 08:57:09 am
By the way, I have bench marked opening the same sprite sheet on my computer using my program and another similar program. Using mine it took around 2 seconds and in the other one around 50 seconds. Someone knows if it's legal and ethical to mention which is the other program? :P

This has been puzzling me since before i posted my project here.

Edit: On second thought, it doesn't really matter. I'm just proud of the performance of my program and wanted to say that being fast is a feature. I have nothing but respect for the other program, since it tried to solve the same problem as mine. I had considered helping his project instead but i found out about it way too late, and after realizing of it's existence, i bench marked both programs and reached the conclusion it would be more fruitful to continue developing mine.