Page 1 of 1

MetaImageset - automatically generating imagesets from files

Posted: Sun May 15, 2011 16:54
by Kulik
Hi,

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? :D )
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" />           
</MetaImageset>


Example texture file of all CEGUI imagery (version 0.8 ):
Image

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.

Re: MetaImageset - automatically generating imagesets from f

Posted: Mon May 16, 2011 07:37
by CrazyEddie
MEGA-Imageset! I like it! :D

CE

Re: MetaImageset - automatically generating imagesets from f

Posted: Mon May 16, 2011 17:10
by Jamarr
Kulik, this looks good so far. I like all of your initiatives hehe.

you end up with just one imageset containing all the images from all the inputs you provided.


So my understanding is that this system will basically allow a larger texture to be composed of several imagesets and/or individual images. Each sub-imageset will still use it's own individual .imageset file to reference images in that sub-set? And how does this apply to individual images? Are they their own imageset or are they referenced from some higher-order imageset? I understand the benefits of composing all images into a single texture, but If you could elaborate on the details of how imageset-images and individual images will be referenced it would clarify the implications of this for me (and perhaps others). Thanks!

Re: MetaImageset - automatically generating imagesets from f

Posted: Mon May 16, 2011 17:21
by Kulik
Basically it just takes each image from the imageset and regards that as a bitmap image. It's made to allow "optimising" imagesets. You just tell it which imageset to take and it takes all rectangle images from it and rectangle packs that. I basically did that "because I can". The main usage of this is to take folder of PNGs/SVGs and compile that into an atlas.

The output is always one .imageset (or another supported imageset format) and one PNG file containing all the data for the texture.

Re: MetaImageset - automatically generating imagesets from f

Posted: Mon May 16, 2011 18:35
by Jamarr
Ok. That was my first assumption. I definitely get the main usage of compiling individual images into a single set. But I was confused when compiling existing imagesets since the output showed an imageset as a single definition instead of having a definition for each of it's sub-images. I assumed it would include the individual definitions. I think what was throwing me off was...

This is what I read:
Basically you create a file with a set of "inputs", be it another Imageset...or to merge 2 imagesets...So you end up with just one imageset containing all the images from all the inputs you provided


And this is what I saw:
This is probably a bad example since I use textures of the stock imagesets as rectangles

Re: MetaImageset - automatically generating imagesets from f

Posted: Wed May 18, 2011 03:10
by rockoz
What a good idea~
An overall PNG file is much easier to pick images in the editor. :hammer:

Re: MetaImageset - automatically generating imagesets from files

Posted: Fri Mar 24, 2017 09:06
by RamsayBolton
Hi, where i can download this tool ?

Re: MetaImageset - automatically generating imagesets from files

Posted: Fri Mar 24, 2017 09:31
by lucebac
It is part of CEED now and called 'ceed-mic'.