Infinity MUGEN Team

IMT Main => M.U.G.E.N Guides & Tutorials => Topic started by: O Ilusionista on February 27, 2012, 03:55:00 PM

Title: Cutting sprites easily
Post by: O Ilusionista on February 27, 2012, 03:55:00 PM
Besides we can simply cut every frame in a graphic editor, there is a tool which can speed up the process a lot.
Its called Alfred SpriteSheet Unpacker

the main advantage: It selects AUTOMATICALLY the frames to extract

1. Main form

This is the opening form of 'Alferd Spritesheet Unpacker'.

Should be fairly obvious but to 'Unpack' a spritesheet simply drag a bitmap file onto the form. Alternatively if you've copied a spritesheet into your clipboard then use the 'From Clipboard' button.
(http://i.imgur.com/l4pv5.png)

2. Unpacking

Once an image has been dropped onto the application 'Alferd Spritesheet Unpacker' will begin identifying the individual frames of animation in the spritesheet bitmap.

Notice the title bar tells us the progress.
(http://i.imgur.com/amCT4.png)

3. Unpacked

Once 'unpacked' all the individual frames are identified with a border.
(http://i.imgur.com/BoGZq.png)


4. Select a loop

We can navigate the spritesheet by holding down the left mouse button and scrolling the bitmap.

Once we've found the animation loop we're interested in we can select each frame by clicking on it.

**Please note: the order these frames are selected defines the file name indexes given to the new bitmaps**
(http://i.imgur.com/mDz2N.png)

5. Export a loop

Now we can click the 'Export Selected' button to export those frames as seperate bitmaps.

The export location defaults to the path in the text box next to the 'Export Selected' button but before the new bitmaps are saved you get the chance to change this location.

Notice the new bitmap's backgrounds are made transparent.
(http://i.imgur.com/eX63v.png)

6. Selecting frames to combine

Sometimes 'Alfred Spritesheet Unpacker' treats a single frame of animation as two or more seperate frames.

To fix this any number of frames can be combined into a single frame. A magnified area at the top left of the form should make selected small frames easier.
(http://i.imgur.com/Janlp.png)

7. Combining frames

Now when we click the 'Combine Selected' button all the selected frames are removed (including any overlapping the new frame area) and a new frame is created combining all those frames selected.
(http://i.imgur.com/lGEnT.png)

8. Cutting frames

Sometimes 'Alfred Spritesheet Unpacker' treats multiple frames of animation as a single frame.

To fix this the application allows any frame to be cut into four smaller frames.
(http://i.imgur.com/vv66n.png)

9. Cut mode

When the 'Cut' mode button is toggled we can pick any point within a frame to cut that frame into four. 'Cut' mode can be toggled via the 'Cut' mode button or clicking the right mouse button.

The new frames are highlighted to show the exact boundary of the new frames. For precise selection the keyboard-arrow-keys can be used to move the cursor.
(http://i.imgur.com/b2xsb.png)


10. After a cut

In this example we only wanted to cut the frame into two but we can quickly use the combine function to get the desired outcome.
(http://i.imgur.com/sYc4o.png)

11. Cut finished

After a quick combine the Spritesheet is now as desired.
(http://i.imgur.com/1ajOy.png)

12. Options

The colours used for highlighting frames within the spritesheet can be changed on the options form as well as the thickness of the frame borders.

There is also the option to change the export file format.

The distance between frames can also be set to allow for spritesheets with frames packed closely together or sprite sheets with frames far apart.
(http://i.imgur.com/JyEdx.png)

The tool in action:
http://www.youtube.com/watch?feature=player_embedded&v=a0WcSTzbvRs# (http://www.youtube.com/watch?feature=player_embedded&v=a0WcSTzbvRs#)

To avoid make the cutted images transparent, click the options buttons and then in the 'Export Options' 'untick' the 'Make Background Transparent' option.

Download it at: http://www.alferdspritesheetunpacker.forkandbeard.co.uk/forkandBeard/apps/AlferdSpritesheetUnpacker/Screenshots.aspx (http://www.alferdspritesheetunpacker.forkandbeard.co.uk/forkandBeard/apps/AlferdSpritesheetUnpacker/Screenshots.aspx)
Title: Re: Cutting sprites easily
Post by: DEMONKAI on February 27, 2012, 05:46:39 PM
This is hot. Thanks a lot for sure. Great for future projects i have in mind :thumbsup:
Title: Re: Cutting sprites easily
Post by: SanjiSasuke on February 27, 2012, 07:57:47 PM
I feel like this should be stickied, very useful.
Title: Re: Cutting sprites easily
Post by: DEMONKAI on February 27, 2012, 08:02:03 PM
I feel like this should be stickied, very useful.

totally Agreed
Title: Re: Cutting sprites easily
Post by: ATiC3 on February 28, 2012, 01:23:27 AM
Great for graphic edits alone too, because I have seen a few people recently posting like HUGE, just empty photos.
Title: Re: Cutting sprites easily
Post by: ExeLord on February 28, 2012, 02:18:03 AM
Nice find, bro! :thumbsup:
Title: Re: Cutting sprites easily
Post by: Rage on February 28, 2012, 05:20:49 AM
 ^^(PM)^ Erik be very useful. Thanx for sharing
Title: Re: Cutting sprites easily
Post by: laspacho on February 28, 2012, 08:41:47 PM
I feel like this should be stickied, very useful.

Done.  I'm going to have to try this out.
Title: Re: Cutting sprites easily
Post by: O Ilusionista on March 04, 2012, 01:10:24 PM
thanks.
For using PCX, the program automatically converts the images for a temporary format, automatically selects all files and export back to .pcx.

its just amazing
Title: Re: Cutting sprites easily
Post by: Rage on March 04, 2012, 02:19:22 PM
so this can xport to pcx?
Title: Re: Cutting sprites easily
Post by: O Ilusionista on March 04, 2012, 02:22:12 PM
yes, but if you use a indexed color pcx, the output pcx doesn't opens in PS, dunno why.
I've opened it on IrFanview and override it. Works.
Title: Re: Cutting sprites easily
Post by: Rage on March 04, 2012, 02:44:28 PM
this will save me so much time. I used to save out each fame as a pcx independently.  ~X( now ill just make a sprite sheet and splice it into single files (pcx) with this. I may even try so other stuff.... >:D
Title: Re: Cutting sprites easily
Post by: Slayer on March 04, 2012, 02:52:41 PM
Hmmm... Very interesting indeed.
Title: Re: Cutting sprites easily
Post by: Rage on March 07, 2012, 02:05:27 PM
Can someone send this my way? the site is down.

Edit i must have  downloaded it a few days ago n didnt know it  :P
Title: Re: Cutting sprites easily
Post by: Rage on June 13, 2012, 10:36:23 PM
Is anyone else having problems making pcx files with this?
SimplePortal 2.3.5 © 2008-2012, SimplePortal