it would be nice if it could crop smartly to the bounds of transparency + padding to reduce dramatically the texture size - or increasing the free space.
If I use images without alpha it crashes. Also, if you could have it auto-resize that would be great.
Example:
Default functionality if images match up
If other options specified:
Source: 32 512x512 Images
Pick: 1024x512 Texture page
Pick: 8x4 Page
Auto resize images to 128x128, place in page
(Or maybe easier if you just pick the image resize value?)
Ex:
Source 512x512 8 Images
Pick 1024x512 Tex Page
Pick Image Resize 256x256
Also, an option to merge an image to alpha (Both a single image, or spritesheet options) would be nice
(edit)
An option for picking first image in a series would be cool, and an option for framerate
- If I have a movie that was rendered out to frames: I could pick the first frame and say every 15th frame, x images, it would automatically pick frame 0,14,29,...img[15x-1]
Unfortunately, I couldn't get it to crash using an image without alpha. I did however find a really bad bug that would crash any time I used a uniform sized page. It's been corrected. Please try it out and tell me if it fixes your problem. If it doesn't, do you think you can send me the image it's crashing on?
I like your ideas for an auto resize, and I'll look into that feature this weekend.
In regards to the image to an alpha, I don't know that I understand. Do you mean something to add an alpha to an existing cell? Or the whole image? How do you envision such a tool working?
In regards to the image to an alpha, I don't know that I understand. Do you mean something to add an alpha to an existing cell? Or the whole image? How do you envision such a tool working?
Add one image alpha to all cells, or add another spritesheet as alpha for whole spritesheet
it would be nice if it could crop smartly to the bounds of transparency + padding to reduce dramatically the texture size - or increasing the free space.
A programmer classmate of mine wrote a prote a program that would pack sprite frames together more efficiently and generated some sort of meta file that specified the bounds and which frame is which. He did that for iPhone pipeline, but I'm wondering if that sort of thing could be used in UDK or other game engines easily for filpbook textures.
I went into some adventures on my own recently and found some other nice resources on this topic. Here is what I have which is pretty much the bin packing approach:
Just curious, how do you keep track of where every single sprite ended up? I see the advantage for lightmaps, where you can change every object's UV to adjust for the packed position, but I always thought for sprite sequences this needed to be uniformly spaced so you can cycle through them.
I'm sure there's an elegant solution though
using a lookup table that gets generated (storing for each rectangle its x,y,width,height attributes). With that you can create a UV array in your engine to render for example a font set, billboards or UI sprites.
Like right now I am using this for Unity3D and a custom font rendering that picks characters as sprites from a atlas like this with a super tight space compression.
Replies
Sure thing!
There are also some good resources on bin packing on the net:
http://www.blackpawn.com/texts/lightmaps/default.html
and some good tools (commercial and lite versions)
http://zwoptexapp.com/
http://texturepacker.com/
the idea is to compress texture similar to UV packing for shadow maps by clustering them tight together starting with one corner:
I've added the ability to build non-uniform pages, I hope it helps
renderhjs:
Wow, you just blew my mind! I will research this topic and implement that feature
Example:
Default functionality if images match up
If other options specified:
Source: 32 512x512 Images
Pick: 1024x512 Texture page
Pick: 8x4 Page
Auto resize images to 128x128, place in page
(Or maybe easier if you just pick the image resize value?)
Ex:
Source 512x512 8 Images
Pick 1024x512 Tex Page
Pick Image Resize 256x256
Also, an option to merge an image to alpha (Both a single image, or spritesheet options) would be nice
(edit)
An option for picking first image in a series would be cool, and an option for framerate
- If I have a movie that was rendered out to frames: I could pick the first frame and say every 15th frame, x images, it would automatically pick frame 0,14,29,...img[15x-1]
-robot
Unfortunately, I couldn't get it to crash using an image without alpha. I did however find a really bad bug that would crash any time I used a uniform sized page. It's been corrected. Please try it out and tell me if it fixes your problem. If it doesn't, do you think you can send me the image it's crashing on?
I like your ideas for an auto resize, and I'll look into that feature this weekend.
In regards to the image to an alpha, I don't know that I understand. Do you mean something to add an alpha to an existing cell? Or the whole image? How do you envision such a tool working?
Add one image alpha to all cells, or add another spritesheet as alpha for whole spritesheet
but here are 3 other methods:
http://kossovsky.net/index.php/2009/07/cshar-rectangle-packing/
Cygon packing
Arevalo packing
I'm sure there's an elegant solution though
Like right now I am using this for Unity3D and a custom font rendering that picks characters as sprites from a atlas like this with a super tight space compression.