I've been recently playing with rectangle packing and the "meta imageset" idea (having some sort of a format that you can generate ready to go imagesets from).
Let me show you a video, because that will explain things much better.
This is probably a bad example since I use textures of the stock imagesets as rectangles so it's hard to distinguish what is really happening, sorry about that.
So what is this? Basically you create a file with a set of "inputs", be it another Imageset, a set of Bitmap (or a single bitmap) and in future, vector images like SVGs and maybe other stuff. Right now you can only do that via manual XML editing but in the future there will be a artist friendly editor for it with preview (this is very easy to do, volunteers? )
After you have your .meta-imageset, you simply run "mic" which is the meta imageset compiler. This thing goes over all inputs, renders all their rectangle data and automatically packs that data onto a texture with the Cygon rectangle packing method. So you end up with just one imageset containing all the images from all the inputs you provided.
In practice you will probably use this to generate imageset from separate PNG files or to merge 2 imagesets.
Example of .meta-imageset: (merges all images from DriveIcons.imageset and all png files in the imagesets folder)
Code: Select all
<MetaImageset output="Output.imageset" onlyPOT="false">
<Imageset path="../datafiles/imagesets/DriveIcons.imageset" />
<BitmapGlob path="../datafiles/imagesets/*.png" xoffset="0" yoffset="0" />
Example texture file of all CEGUI imagery (version 0.8 ):
There is still work to do on the tool, especially considering overlapping image optimisations and such but it works and is usable right now.
I will fix up several issues and provide a Windows build of this usable without any dependencies in the coming days.