Open sprite sheet metadata format
I wanted to run an idea past the community here to get some feedback and see if this is something that would be useful to both artists and developers.
Problem:
There are tools for creating, packing, and exporting sprite sheets but no common format for the metadata. Here, most of the sprite sheets come with no metadata. In many cases this leaves developers with the task of slicing the sprites manually when the sheet is packed with non uniform tile size. Different game engines support different formats or have tools to deal with this, others not so much.
Proposal:
Define an open, human readable metadata sprite sheet format that could be included with a sprite sheet. This way, those who download the set wouldn't need the software that created it to be able to export to their game engine. Something like JSON that would be easy to parse by most tools/engines so support could be added on both sides to make it a commonly accepted "standard". The file would contain basic info like x,y,width,height, etc. so you know where each sprite "lives" on the sheet.
The goal would be to make it easier for developers to utilize the artwork here. The format itself would be the first step as it'd need to be promoted to gain support. Tools could then be developed to export/import for various tools and engines. Without a common format today, it feels like everyone is doing the grunt work using different tools/methods that fit the need at the time.
I did some searching on various forums including this one and this often times stops beginners from knowing what to do with some of the great artwork available here. So it'd also help artists who put the time to contribute artwork here by making it easier for others to utilize their work.
Let me know what you think, not fully fleshed out but if this has enough momentum it'd be something I'd be interested in working on.
I dont really understand all the metadata stuff, but do you mean like to 'index' the Sprite sheet?
example:
name:character animation sheet
10 animations
full width 300 pixels
full height 300 pixels
idle frames: 4
frame 1: x 0, y 0, x1 32, y1 32
frame 2: x 32,y 32, x1 32, y1 32
frame 3: x 64, y 64, x1 64 , y1 64
frame 4: x 96,y 96, x1 96, y1 96
walk frames:
etc, something like that anyway, basically to coordinate the frames/Sprite or map the sheet in some way so it could be used as a coded entry to an object.
Chasersgaming | Support | Monstropolis |
@chasersgaming, yes, that's exactly the type of information I'm thinking as you mentioned to 'index' the sprite sheet.
Some sprite sheets are exact tiles, say 32x32 and it's easy to get each sprite but others are packed and not in rows/columns as well as some sprites different sizes, not arranged in order, etc.
If we have a standard text file format attached with each sprite sheet then game engines or other tools can read this format and be able to use the various sprites, slice them and save them out as individual images if needed, etc.
The thing is we don't have a 'standard' format for what this text file would look like. My idea is to propose an open standard format.
I wouldn't know what to use either, I suppose have to wait until someone suggests something as a 'standard' file for it. :)
Chasersgaming | Support | Monstropolis |
As a dev, metadata files are mostly tedious. Not in a 'cut out everything correctly' way, but it a 'I should name all of these for readability' sort of way. Custom metadata formatting would be all but useless to me.
When I'm working with the LPC set, I have a system: I cut each animation out into its own large block (say, the 'swing' animation). Then I just paste in the same 'swing' metadata file for everything. Unity throws a small soft error about the file's GUID being a duplicate and assigns a new one, and all's well. (I chop the sheets up for good reason-- I'll explain if you want, but it's a tad off-topic.)
Now, what I could do is when I push all the LPC clothing assets on github, I could let other people submit other game engine metadata files for the seven animation blocks and keep a small inter-engine library for the set. Once I have that, LPC submissions on this site could be made with a copy of the 'master metadata files', each one a zip file and labeled 'Metadata files - Unity' and so on.
Maybe if a creator wants to metadata their sprites, it would be easier to just make a forum thread asking for files from different game engines for ease of use? And the larger, more popular sets can use repository and community tools.
Are you referring to spritesheets here on OGA? Can you provide some examples of spritesheets that do not conform to a static tile size? I know they exist elsewhere, but I can't recall seeing any here.
--Medicine Storm
@ElizaWy, Unity has some pretty good built in tools for dealing with sprite sheets so maybe less of an issue there. That isn't to say the workflow couldn't be improved if there is a unity plugin that can read a common metadata format and automatically bring in the individual sprites for an animation for example.
Part of the problem I'm looking to address is having creators have to make or ask for files that work with different game engines to include with the sheets. Even if the community wants to contribute them, that would be alot of files and still wouldn't cover some of the less popular engines.
If there is one common format then the various game engines can have tools or scripts that read the common format instead. Then one sheet and one file is all that is needed. At least, that's the idea so far.
@MedicineStorm, yes, but not just not just OGA as there are other sites as well but focusing on here for now:
Something like this:
https://opengameart.org/content/xeon-ultimate-smash-friends
https://opengameart.org/content/generic-platformer-tiles
The tiles you could use a tool like Tiled to work with and read their metadata format. I'm just thinking there should be one common format to work with regardless of the type of sheet.