I wrote a Miyagi Skin exporter for Sprite Sheet Packer

Aralox

29-03-2012 13:35:19

Update 2: I fixed the xml error that you get when trying to load a skin - this was caused by the comment line being before the xml declaration, which was something I quickly did right at the end without testing. I have swapped them around, and now it works fine.

Update 1: If you use Gimp, check out this plugin I wrote that both exports your layers and calls Sprite Sheet Packer.

I very quickly got tired of using Miyagi's Skin Editor (see here) to create my skins, and so went looking for an automated solution. After spending some time with various programs, I found Sprite Sheet Packer, which is a really nice piece of open software that packs a bunch of images into a texture atlas, and creates a map (text file) that contains info about each image's position on the atlas.

This is basically what a Miyagi skin is, so I went ahead and pulled and modified a copy of SSP (which is incidentally in C#) to include a Miyagi skin exporter (as well as a few other cleanups on the project).
The only caveat being: Animation is not supported. It would be quite trivial to do it, but I don't use it so I didn't. I also didn't do anything about Gpu programs.
My code is up there, so feel free to get yourself a copy and make it better :)

Here are the binaries: http://www.box.com/s/d6cf9e390fdc0d32d58c
And the source can be found in my patch, on this page: http://spritesheetpacker.codeplex.com/SourceControl/list/patches
(Direct link to my patch: http://www.codeplex.com/Download?ProjectName=spritesheetpacker&DownloadId=365532)

Its very easy to use, and >9000 times more awesome than doing skins by hand using the Skin Editor.
Have fun!

Aralox

30-03-2012 13:18:07

An additional note for people looking for a workflow - Create different frames as layers in Gimp, and export them using this plugin http://registry.gimp.org/node/18440.
I modified it slightly to not add the filename to the front, so the exported files match the layer names exactly.
Here is my modified version: http://www.box.com/s/9101a050af567b590860

Beauty

30-03-2012 15:16:51

Thanks for publishing and describing your work. :D
It's also nice to see, that you already added a link to the Miyagi wiki page.

Perhaps it would be useful to put your code to the official Miyagi repository?
(Makes only sense, when the Miyagi maintainer Smiley aggrees and perhaps give you write-access to his Miyagi repository.)

Just in this moment I created a news entry about your useful exporter to the Mogre wiki page.

You also could write an announcement in the Axiom forums. (Axiom is a C# port of Ogre)
They also use Miyagi and could be happy to know about your project.
Maybe there is also somebody who like to add further improvements.

Aralox

31-03-2012 00:15:47

You're most welcome! :D

I'd be glad to put it up in the official Miyagi repo if smiley is fine with it - we need more material there to help people use Miyagi.
Its such a good gui system, but a little difficult to start learning.

And sure, i'll go post something up on the Axiom forums too.

Oh and another thing, do you know where smiley80 is? The loss of the Miyagi thread is really devastating if it cant be recovered :(

Aralox

02-04-2012 11:43:29

I wrote a Gimp plugin that will export your layers, then call Sprite Sheet Packer on them to generate a texture atlas and (miyagi skin) map file.
It was quite a fun learning experience, and speeds up my workflow even more.

I have uploaded it to the Gimp plugin repository here: http://registry.gimp.org/node/26161

Enjoy! :)

Beauty

03-04-2012 13:58:44

we need more material there to help people use Miyagi. [...]
Its such a good gui system, but a little difficult to start learning.

I never used Miyagi, but I also think that it would be useful to:
  1. Offer a tiny example application (so newcomers can play with it)[/*:m]
  2. Add this example to the MogreSDK repository (so it can be included to the next SDK installer)[/*:m]
  3. Offer some material packs[/*:m]
  4. Tutorials [/*:m]
  5. Code snippets[/*:m][/list:u]

    If I remember right, smiley80 created a seperate website with wiki and forum. Perhaps some of the points are still soved.

    Oh and another thing, do you know where smiley80 is?
    I don't know. He is one of the "oldest" active Mogre supporter.
    His last post in the Mogre forum was 2 months ago.

    Maybe he has not much free-time in the moment.
    So I propose to write him a PM with a link to this topic.

    The loss of the Miyagi thread is really devastating if it cant be recovered :(
    I saw it a few days ago and I'm very sad, too.
    The topic wasn't deleted by me and deleted topics can't be recovered. :cry:

Aralox

05-04-2012 09:45:54

There is actually an example Miyagi project in the repo, but I couldnt figure out how to download the project as a whole. I trawled through the individual code files and managed to build up enough knowledge to write a basic example application here. I would have been really happy to have had that when I started, so I hope miyagi newbies like me manage to find it.

And im quite sad to hear that the thread cant be recovered... :( oh well, I hope everything is ok with smiley80

moron

24-07-2012 23:49:45

It should work by clicking the button to select the map file and choosing .skin, right? All I see are TXT, UVTXT, and XML. Packs the images just fine, no errors, but I can't figure out how to get it to export as a miyagi skin.

Aralox

25-07-2012 00:48:51

Yes, and thats strange, i just checked it and it works for me. Try typing in "[map name].skin" manually and see if it works. It might be that sspack is not allowed to access the skin export dll due to screwy permissions. See if the dll is 'blocked', which was a problem apocacist had. http://www.ogre3d.org/addonforums/viewtopic.php?f=8&t=29359&start=15#p99635

moron

25-07-2012 01:28:52

No go. It's not blocked, and nothing is wrong with the permissions. Manually entering in the extention pops up an error dialog box that says "Error packing images: Map Exporter". Only happens with .skin. Any other random 4 letter string gets saved normally as testskin.frog.txt or what have you.

Aralox

25-07-2012 03:07:07

This is running the sprite sheet packer that I compiled yeah (i.e. right out of the download)? not the vanilla one provided on the site? im 99% sure it is, but at the moment I cant think of anything else. Maybe try saving it to a different directory and try running it, or maybe right click on the sprite sheet packer exe and run as administrator.
Also, if you have Gimp, try running the gimp plugin I wrote for it

moron

25-07-2012 03:20:02

Yeah, it's the download in this thread. For some reason it's working on my netbook. Netbook is x86, this and other computers it's been tested on were x64. That could be the problem.

moron

25-07-2012 03:32:19

Just tested it in a VM running XP Pro (x86) and it also works.

Edit: Found out what was wrong. The exporter was compiled for 32 bit processors only. Set it to Any Cpu, recompiled, and it works fine now. Looks handy!

EditEdit: Also, it was only the exporter's project. Everything else was already on Any CPU, which is why it was only the exporter not working.

Aralox

25-07-2012 10:23:46

Ohh sweet, thanks for the heads up, thats something I will definitely remember for the future