Home Technical Talk

Sprite Page Creator for FX Artists

Hey all,

I've recently created a tool for FX artists. It takes an image sequence and compiles it into a spritepage, alpha and all.

[ame]http://www.youtube.com/watch?v=xdqos5EXWFo[/ame]

You can download it at my website, here:
http://www.horowitz3d.com/scripts.html

I would love your feedback and/or suggestions for this tool



EDIT: Tool can now create non-uniform pages

Replies

  • TDub
    Options
    Offline / Send Message
    TDub polycounter lvl 13
    looks great and simple man! thanks :)
  • billredd
    Options
    Offline / Send Message
    billredd polycounter lvl 13
    Sweet! Uu da man!
  • RobotGilardi
    Options
    Offline / Send Message
    Looks great, any chance you could put an option for non uniform spritesheets (1024x512) and such?
  • Foxious
    Options
    Offline / Send Message
    Looks great, any chance you could put an option for non uniform spritesheets (1024x512) and such?

    Sure thing!
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    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.

    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:
    ex1.jpg
  • ceebee
    Options
    Offline / Send Message
    ceebee polycounter lvl 14
    Great tool dude! I'm in a real time effects class right now and I'll show this to the instructor. This will save me some good time :)
  • Foxious
    Options
    Offline / Send Message
    RobotGilardi:
    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
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    thats because I am working on similar things right now myself (texRipper related)
  • RobotGilardi
    Options
    Offline / Send Message
    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]


    -robot
  • Foxious
    Options
    Offline / Send Message
    Thanks for the feedback!

    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?
  • RobotGilardi
    Options
    Offline / Send Message
    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
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    renderhjs wrote: »
    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.

    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:
    ex1.jpg
    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.
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    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:
    sprite_packer_progress.jpg

    but here are 3 other methods:
    http://kossovsky.net/index.php/2009/07/cshar-rectangle-packing/

    Cygon packing
    cygon-rectangle-packer.png

    Arevalo packing
    arevalo-rectangle-packer.png
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    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 :)
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    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.
Sign In or Register to comment.