MetaImageset - automatically generating imagesets from files

Forum for support and development discussion regarding the python based unified editor tool for CEGUI, known as CEED.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

MetaImageset - automatically generating imagesets from files

Postby Kulik » Sun May 15, 2011 16:54

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.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: MetaImageset - automatically generating imagesets from f

Postby CrazyEddie » Mon May 16, 2011 07:37

MEGA-Imageset! I like it! :D

CE

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: MetaImageset - automatically generating imagesets from f

Postby Jamarr » Mon May 16, 2011 17:10

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!
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: MetaImageset - automatically generating imagesets from f

Postby Kulik » Mon May 16, 2011 17:21

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.

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: MetaImageset - automatically generating imagesets from f

Postby Jamarr » Mon May 16, 2011 18:35

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
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

rockoz
Not too shy to talk
Not too shy to talk
Posts: 34
Joined: Tue Sep 22, 2009 02:26

Re: MetaImageset - automatically generating imagesets from f

Postby rockoz » Wed May 18, 2011 03:10

What a good idea~
An overall PNG file is much easier to pick images in the editor. :hammer:

RamsayBolton
Just popping in
Just popping in
Posts: 1
Joined: Fri Mar 24, 2017 09:04

Re: MetaImageset - automatically generating imagesets from files

Postby RamsayBolton » Fri Mar 24, 2017 09:06

Hi, where i can download this tool ?

lucebac
Just can't stay away
Just can't stay away
Posts: 193
Joined: Sat May 24, 2014 21:55

Re: MetaImageset - automatically generating imagesets from files

Postby lucebac » Fri Mar 24, 2017 09:31

It is part of CEED now and called 'ceed-mic'.


Return to “Official Unified CEGUI Editor Tool (CEED)”

Who is online

Users browsing this forum: No registered users and 1 guest