Google

I wrote a Miyagi Skin exporter for Sprite Sheet Packer

Discussion regarding the Managed .Net Wrapper for Ogre, MOGRE (http://sourceforge.net/projects/mogre)

Moderators: OGRE Team, MOGRE Moderators

I wrote a Miyagi Skin exporter for Sprite Sheet Packer

Postby Aralox » Thu Mar 29, 2012 1:35 pm

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!
Last edited by Aralox on Sun Apr 08, 2012 8:37 am, edited 4 times in total.

For this message the author Aralox has received 4 kudos
User avatar
Aralox
Halfling
 
Posts: 54
Kudos: 12
Joined: 08 Jan 2012
Location: Melbourne, Australia

Re: I wrote a Miyagi Skin exporter for Sprite Sheet Packer

Postby Aralox » Fri Mar 30, 2012 1:18 pm

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
User avatar
Aralox
Halfling
 
Posts: 54
Kudos: 12
Joined: 08 Jan 2012
Location: Melbourne, Australia

Re: I wrote a Miyagi Skin exporter for Sprite Sheet Packer

Postby Beauty » Fri Mar 30, 2012 3:16 pm

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.
Help to add information to the wiki. Also tiny edits will let it grow ... :idea:
Add your country to your profile ... it's interesting to know from where of the world you are.
IRC chat ... Mogre: irc://freenode/#mogre ... Ogre: irc://freenode/#ogre3d
User avatar
Beauty
OGRE Community Helper
 
Posts: 1595
Kudos: 35
Joined: 09 May 2007
Location: Germany

Re: I wrote a Miyagi Skin exporter for Sprite Sheet Packer

Postby Aralox » Sat Mar 31, 2012 12:15 am

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 :(
User avatar
Aralox
Halfling
 
Posts: 54
Kudos: 12
Joined: 08 Jan 2012
Location: Melbourne, Australia

Re: I wrote a Miyagi Skin exporter for Sprite Sheet Packer

Postby Aralox » Mon Apr 02, 2012 11:43 am

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! :)
User avatar
Aralox
Halfling
 
Posts: 54
Kudos: 12
Joined: 08 Jan 2012
Location: Melbourne, Australia

Re: I wrote a Miyagi Skin exporter for Sprite Sheet Packer

Postby Beauty » Tue Apr 03, 2012 1:58 pm

Aralox wrote: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:
  • Offer a tiny example application (so newcomers can play with it)
  • Add this example to the MogreSDK repository (so it can be included to the next SDK installer)
  • Offer some material packs
  • Tutorials
  • Code snippets

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

Aralox wrote: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.

Aralox wrote: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:
Help to add information to the wiki. Also tiny edits will let it grow ... :idea:
Add your country to your profile ... it's interesting to know from where of the world you are.
IRC chat ... Mogre: irc://freenode/#mogre ... Ogre: irc://freenode/#ogre3d
User avatar
Beauty
OGRE Community Helper
 
Posts: 1595
Kudos: 35
Joined: 09 May 2007
Location: Germany

Re: I wrote a Miyagi Skin exporter for Sprite Sheet Packer

Postby Aralox » Thu Apr 05, 2012 9:45 am

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
User avatar
Aralox
Halfling
 
Posts: 54
Kudos: 12
Joined: 08 Jan 2012
Location: Melbourne, Australia

Re: I wrote a Miyagi Skin exporter for Sprite Sheet Packer

Postby moron » Tue Jul 24, 2012 11:49 pm

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.
moron
Gnoblar
 
Posts: 9
Kudos: 0
Joined: 31 Mar 2012

Re: I wrote a Miyagi Skin exporter for Sprite Sheet Packer

Postby Aralox » Wed Jul 25, 2012 12:48 am

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
User avatar
Aralox
Halfling
 
Posts: 54
Kudos: 12
Joined: 08 Jan 2012
Location: Melbourne, Australia

Re: I wrote a Miyagi Skin exporter for Sprite Sheet Packer

Postby moron » Wed Jul 25, 2012 1:28 am

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.
moron
Gnoblar
 
Posts: 9
Kudos: 0
Joined: 31 Mar 2012

Re: I wrote a Miyagi Skin exporter for Sprite Sheet Packer

Postby Aralox » Wed Jul 25, 2012 3:07 am

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
User avatar
Aralox
Halfling
 
Posts: 54
Kudos: 12
Joined: 08 Jan 2012
Location: Melbourne, Australia

Re: I wrote a Miyagi Skin exporter for Sprite Sheet Packer

Postby moron » Wed Jul 25, 2012 3:20 am

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
Gnoblar
 
Posts: 9
Kudos: 0
Joined: 31 Mar 2012

Re: I wrote a Miyagi Skin exporter for Sprite Sheet Packer

Postby moron » Wed Jul 25, 2012 3:32 am

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.
moron
Gnoblar
 
Posts: 9
Kudos: 0
Joined: 31 Mar 2012

Re: I wrote a Miyagi Skin exporter for Sprite Sheet Packer

Postby Aralox » Wed Jul 25, 2012 10:23 am

Ohh sweet, thanks for the heads up, thats something I will definitely remember for the future
User avatar
Aralox
Halfling
 
Posts: 54
Kudos: 12
Joined: 08 Jan 2012
Location: Melbourne, Australia


Return to MOGRE

Who is online

Users browsing this forum: Exabot [Bot], Google Adsense [Bot] and 2 guests