The VG Resource
Chase's Sprite Cutter - Printable Version

+- The VG Resource (https://www.vg-resource.com)
+-- Forum: Archive (https://www.vg-resource.com/forum-65.html)
+--- Forum: July 2014 Archive (https://www.vg-resource.com/forum-139.html)
+---- Forum: Creative Zone (https://www.vg-resource.com/forum-86.html)
+----- Forum: Games Development (https://www.vg-resource.com/forum-22.html)
+----- Thread: Chase's Sprite Cutter (/thread-21536.html)

Pages: 1 2


Chase's Sprite Cutter - Chase - 09-27-2012

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!



RE: A small sprite auto cutting tool I wrote - Previous - 09-28-2012

I moved it to GameDev, where we have other small tools like this! Genki ^_^


RE: A small sprite auto cutting tool I wrote - Chase - 09-28-2012

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.


RE: A small sprite auto cutting tool I wrote - Gors - 09-28-2012

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.


RE: A small sprite auto cutting tool I wrote - Dazz - 09-28-2012

Agreed, great idea! There's a few programs that act similar, but nothing that's just a simple dumper of images. Nice one! Smile


RE: A small sprite auto cutting tool I wrote - Chase - 09-28-2012

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.


RE: A small sprite auto cutting tool I wrote - Chase - 10-01-2012

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]


RE: A small sprite auto cutting tool I wrote - Previous - 10-01-2012

Hey I am a programmer and prefer GUI programs. Genki ^_^


RE: A small sprite auto cutting tool I wrote - Phaze - 10-01-2012

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


RE: A small sprite auto cutting tool I wrote - Garamonde - 10-01-2012

I know nothing about programming so GUI is always a huge help for people like me.


RE: A small sprite auto cutting tool I wrote - Phaze - 10-01-2012

(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!


RE: A small sprite auto cutting tool I wrote - Chase - 10-07-2012

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.


RE: A small sprite auto cutting tool I wrote - Previous - 12-28-2012

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.


RE: A small sprite auto cutting tool I wrote - Chase - 04-23-2013

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.


RE: A small sprite auto cutting tool I wrote - Chase - 04-23-2013

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