Users browsing this thread: 1 Guest(s)
Chase's Sprite Cutter
#1
This is a small java program that turns a normal sprite sheet (that you can find on spriter's resource) into individual sprite images.

Latest Version Download Link
Original Console Version

Latest Version: 1.5 on Aug 05, 2013

I looked around sprites resource and found that most of the sprites were sort of jumbled together. Not a rippers fault, but it makes any kind of use of the sprites difficult, and I don't want to spend a few hours in photoshop just so I could grin at seeing an animated version.

I looked around and couldn't really find anything that could fix that exactly. So I wrote a small java program that automatically cuts up a sprite sheet and spits out all the individual sprites. Of course there is some margin of error, but I tried to add some command line options that can help you tweak those.

Originally I planned to add something that could go about aligning similar sprites to make animation easier. I have a few simple AI designs that work sometimes (PM, statistical, color fudging, area averaging, etc), but nothing that actually works good enough for release yet.

Known problems:
  • It can jam up on really large sprite sets. So you might have to do a little cutting by hand anyway.
  • Not all sprite sheet are completely compatible, some of them that use line separation can cause large extra images to be generated. I may fix this eventually.
  • It is not a tile cutter, things that are perfectly tiled already don't really need the use of this tool. I may add this eventually.
  • All sprites displayed in the preview box take up the same area, so one large sprite can make a bunch of small sprites take up that much area in the preview pane. I may fix this eventually.
  • It can be a little slow.

How it works:
It generates an image mask from the sprite image and then searches pixel by pixel for a area that is not background, once found it flood fills that area and records the pixel locations which it then uses to generate a bounding box and alpha mask (if using masking option) for output.

[Image: iqLXHi0Pz57C6.png]

How to use it:
  1. Click and Drag your file onto the "Drag and Drop Image Here" Box.
  2. Adjust your options according to the preview for the options you want.
  3. Select an export location (if you want it somewhere else)
  4. Click "Export To Files" button
  5. Your done!
Thanked by: Gors, puggsoy, Shade
#2
I moved it to GameDev, where we have other small tools like this! Genki ^_^
Thanked by:
#3
Thanks for moving this! I wasn't sure where to post it.

Just to note, I found that the version I had posted was an older version, I updated the link and provided a visual example. Might get more people interested in my little tool.
Thanked by: Previous, Gors
#4
even if I don't use those tools myself (I hardly work with sprite sheets), I find those type of tools interesting and encourage them. Any attempt to make spriting conveninent is A-OK in my book.
Spriter Gors】【Bandcamp】【Twitter】【YouTube】【Tumblr】【Portifolio
If you like my C+C, please rate me up. It helps me know I'm helping!
[Image: deT1vCJ.png]
Thanked by:
#5
Agreed, great idea! There's a few programs that act similar, but nothing that's just a simple dumper of images. Nice one! Smile
Tsunami Bomb - The Simple Truth
We could run away
Leave behind anything paper
Not knowing where we're going to stay
When there's no Mondays

You're part of me, it's so easy to see the simple truth
When I'm in your arms, I feel safe from harm and sorrow too
You're part of me, it's so easy to see the simple truth
But most of all, nothing couldn't be solved when I'm with you
Thanked by:
#6
Glad you like it, if you have any suggestions, please let me know.

A GUI is not out of the question if people want it , but I feel it just gums up the works at the moment.
Thanked by:
#7
Okay I added a GUI, since I have reports here stating that most people prefer to have a GUI of some kind. Something to do with that most people are not programmers.

I couldn't believe it at first myself, but I can't argue with people who take the time to make graphs and convincing arguments.

So here is a version with a GUI. http://www.mediafire.com/?sxkifacinvai7fe

[Image: gui_cutter_by_chase_san-d5gjqpc.jpg]
Thanked by: Previous
#8
Hey I am a programmer and prefer GUI programs. Genki ^_^
Thanked by: Hoeloe
#9
GUIs are nice, but sometimes I prefer plain text output.

That's usually in the case of servers though. A GUI helps this kind of tool Big Grin
Thanked by:
#10
I know nothing about programming so GUI is always a huge help for people like me.
[Image: sweet-capn-cakes-deltarune.gif]
Thanked by:
#11
(10-01-2012, 09:11 AM)Mighty Jazzers Wrote: I know nothing about programming so GUI is always a huge help for people like me.
You don't always need to know how to program in order to handle a text interface but I suppose most programs with a text interface are rather obtuse to non-programmers!
Thanked by:
#12
Okay, here a 1.3

I had an hour or so so I vamped up this little tool to be more friendly for everyone. Still need to hammer a square file chooser into the round hole of the interface for an alternative import option, but I can do that tomorrow in a spare 5-10 minute window probably.

Hopefully this will be even easier and more useful to use. Adds an in app preview, but because I had to add a button to export them out. Also hopefully improved the ability to handler larger files (but that's only in theory and not at all proven).
[Image: gui2_by_chase_san-d5h4z95.png]

Download Link

I also added an .exe runner and removed the .bat runner for those who distrust those kind of files. (anyone who uses Mac OS X or Linux probably can figure out how to run the jar).

You only need the .exe or the .jar, not both. Regardless of platform. Also I included my messy messy messy source. Since I am messy when I can be.
Thanked by:
#13
A bit of a bump, yes, but I think I may (plus this tool deserves it haha).

At first I thought I was the sheet size (so I cut it down manually into a bunch of smaller ones), but in the end it wasn't! I noticed your tool has a huge issue when sprites are at the very border of a sheet. Then, it won't bring up any sprites at all.
Thanked by: Chase
#14
Ah sorry, this thread got pretty lost so I missed your bump (I do not check the forums that often).

I'll see about fixing that. If you could give me a sample of the problem it will be easier to fix. But I think I know what problem you are talking about.
Thanked by:
#15
Sorry it took me 4 months to notice your problem Previous.

v1.4:
Locked the locale to US (solves a few minor UI bugs, I don't have alternate translations anyway).
Fixed a bug in the secondary mask option where it would not always enable correctly.
Fixed a bug where the sprite on the edge of a sheet caused the program to seize up (it was a simple fix).
Added a file chooser to import a sprite.
Added an option to sample the (center of the) edges and corners to determine background color (uses the one that occurs most often).
Added an generic error message system so that bugs are easier to report.
Uses Java 6

Watched a movie, then I got to fixing this, then I got done fixing it. Here you go, all fixed (in theory).

Download
Thanked by:


Forum Jump: