Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Is there an efficient way to rearrange a texture pack? — Gideros Forum

Is there an efficient way to rearrange a texture pack?

joelghilljoelghill Member
edited November 2012 in General questions
I have a large image with many subimages within it that I plan on using for character animations. The issue is that the smaller subimages are not arranged in a perfect or consistant grid.

I'd like to find a way to take all of the smaller subimages, split them into separate files, then rearrange into a large texture pack again. I can imagine that the last part could be done with the Gideros Texture Packer.

So far, I'm afraid that I'm going to have to go into photoshop (or similar program) and cut and paste each subimage into a new image file of it's own.

Is there a better way to do this?

Comments

  • GregBUGGregBUG Guru
    edited November 2012 Accepted Answer
    mmm shoebox ?


    basically it's has functionality of TexturePackerPro + lots more + it's free.
    Key features
    - Pack Sprites - crops transparency, smart power of two
    - Extract Sprites - magic extractor of those ripped sprite sheets
    - Extract Tiles - cuts screen into map tiles
    - Bitmap Font - create beautiful Photoshop fonts and pack them as fnt data.
    - Extract SWF - flash animations into textures and xml

    win and mac
    http://renderhjs.net/shoebox/

    TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! -
    www.tntengine.com
  • Just curious if there is any specific reason you want same subimages in a perfect grid, rather than scattered around whole texture? Does it change something from a performance point of view?
  • If they were in a perfect grid, it would be simple to manually write the text file that the Gideros Texturepack class needs. If the images are scattered around (or even worse, just a few pixels off) I have to go through and measure where each sub image is. It's really just to save work. I really have no idea if it affects performance or not :P

    I guess I don't really need them in a perfect grid... I just need an efficient way to turn the image I have into a Gideros friendly state.
  • mmm shoebox ?


    basically it's has functionality of TexturePackerPro + lots more + it's free.
    Key features
    - Pack Sprites - crops transparency, smart power of two
    - Extract Sprites - magic extractor of those ripped sprite sheets
    - Extract Tiles - cuts screen into map tiles
    - Bitmap Font - create beautiful Photoshop fonts and pack them as fnt data.
    - Extract SWF - flash animations into textures and xml

    win and mac
    http://renderhjs.net/shoebox/

    That looks like it might be exactly what I need! Thanks!
  • ar2rsawseenar2rsawseen Maintainer
    edited November 2012
    Well as far as I know than texture packer provides a text file with defined regions, and you can simply iterate and get texture regions
    local pack = TexturePack.new("images/levelPack.txt", "images/levelPack.png", true)
    for i = 1, 10 do
        local loadedImage = pack:getTextureRegion("image"..i..".png")
    end
    and you get all the images for your animation, by their name from image1.png to image10.png

    Just saying ;)
  • The way I understood, the texture packer only provided the regions when you create a texture pack out of separate sub images. What I had was one big image, so the texture packer was treating it as though it was one sub image to be combined with other images.

    What I've done is take the big image, used Shoebox to turn it into it's sub images, then I imported the sub images into Texture packer. From there I exported the texture pack with text file (which I didn't have before). Now I'm playing with TNT Animator studio to build my animations. I can also use the TexturePack class as you described above.

    What I've done could have been a lot shorter if Texture Packer was able to split a single png file based on the transparency separating the subimages. Or maybe it can do that and I didn't know :P
  • ar2rsawseenar2rsawseen Maintainer
    edited November 2012
    @joelghill Ok I understood now. You're right! ;)
    Shoebox was probably the only best way
Sign In or Register to comment.