Home Technical Talk

SpritePlane: a sprite sheet generator script for Photoshop

polycounter lvl 10
Offline / Send Message
mediochrea polycounter lvl 10
Greetings, Polycount! Yesterday I finished my first somewhat serious piece of software.

It's a little script that converts this: c2MEB.gif into this: FDHsu.png

The resulting sprite sheets are ready for use in many game engines, such as FlashPunk, an amazing framework for Flash that we are using for our game. I was pretty tired of having to make them by hand, so I decided to automate the process. Mind you, I'm more of an artist than a programmer, and this is my first time releasing to public, but you'll see that the script came out pretty good. I'm also planning on developing it even further, to add features and improve usability.

You can grab it (as well as a detailed readme) here: https://github.com/mediochrea/SpritePlane

I do hope it makes someone's life easier! Critique and suggestions are very welcome. :)

Replies

  • Next
    Offline / Send Message
    Next polycounter lvl 12
    ohh maan this is so awesome ! i luv it!
    i always wanted a nice and simple solution inside photoshop for this kind of tasks.
    thank u very very much for sharing this with the community!!

    cheers next
  • mediochrea
    Offline / Send Message
    mediochrea polycounter lvl 10
    Next wrote: »
    ohh maan this is so awesome ! i luv it!
    i always wanted a nice and simple solution inside photoshop for this kind of tasks.
    thank u very very much for sharing this with the community!!

    cheers next
    Thanks man! I'm glad that someone finds it useful!
  • SirCalalot
    Offline / Send Message
    SirCalalot polycounter lvl 10
    This is brilliant!
  • mediochrea
    Offline / Send Message
    mediochrea polycounter lvl 10
    SirCalalot wrote: »
    This is brilliant!
    Thank you! Share your experience if you decide to check it out! :)
  • Dexmac
    This is awesome! I do have some suggestions. How about a version that uses Layer Comps. They are very useful when a particular image uses more than one layer.

    Also, it appears your script modifies what ever file it is run from. Perhaps you could make it open a new document and copy (or better yet place) the elements in the new file rather than changing the existing file?

    Thanks! :-) Brian
  • SirCalalot
    Offline / Send Message
    SirCalalot polycounter lvl 10
    Is there a possibility of converting our sprite sheets back into animations after edits to the sheet?
  • latorril
    Offline / Send Message
    latorril polycounter lvl 6
    SpritePlane v1.0 crashed on line #388 in Photoshop CS5.

    "Error 60: Not well-formed (invalid token)
    Line: 388

    ..."
  • SirCalalot
    Offline / Send Message
    SirCalalot polycounter lvl 10
    mediochrea wrote: »
    Thank you! Share your experience if you decide to check it out! :)
    I forgot to mention, I've been using your script for some 2D idle animations of mine.

    For example, turning this guy:

    9aouq.gif

    Into this:

    te1In.png

    Thanks again for this :D
  • mediochrea
    Offline / Send Message
    mediochrea polycounter lvl 10
    latorril wrote: »
    SpritePlane v1.0 crashed on line #388 in Photoshop CS5.

    "Error 60: Not well-formed (invalid token)
    Line: 388

    ..."

    Huh, this is weird. Looks like an XML parsing error, I'll look into it some time in the future.
  • mediochrea
    Offline / Send Message
    mediochrea polycounter lvl 10
    SirCalalot: My pleasure mate! Looks great! And I will continue working on the script in the near future, I shouldn't have left it like that. :D
  • Trunks252
    Just want to say thanks for the script and confirm that it works in CS6 but not CC.
  • mediochrea
    Offline / Send Message
    mediochrea polycounter lvl 10
    Trunks252 wrote: »
    Just want to say thanks for the script and confirm that it works in CS6 but not CC.

    Thanks for using it! And yeah, I will eventually update it to work with CC, as well as add some more cool things, pretty soon too, actually.
  • AnalogKid
    Looking forward to the CC version!
  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    should add a feature to use image sequences, so i could say use it to make a flipbook from a pile of tgas rendered from maya nDynamics
  • mediochrea
    Offline / Send Message
    mediochrea polycounter lvl 10
    passerby wrote: »
    should add a feature to use image sequences, so i could say use it to make a flipbook from a pile of tgas rendered from maya nDynamics
    Yep, it's on the roadmap! Will definitely be included in the extension version.
  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    Nice good to hear, that way people won't need aftereffects to work with flipbooks rendered from fumefx or Maya.
  • Invertex
    Offline / Send Message
    Invertex polycounter lvl 4
    AnalogKid wrote: »
    Looking forward to the CC version!
    Trunks252 wrote: »
    Just want to say thanks for the script and confirm that it works in CS6 but not CC.

    The branch hasn't been updated, yet the script is working fine for me in CC. Perhaps it was a bug in CC that has been patched?

    Anyways, great script mediochrea! It fills a need that no other software does as efficiently or quick. The other scripts out there that try to do similar, are painstakingly slow and require frame export first... eugh. Looking forward to future updates!
  • low_polly
    Offline / Send Message
    low_polly polycounter lvl 11
    I know this is old but this is awesome Mediochrea. Was looking for something for Photoshop CS6 too.  Thanks.
    Do you know if there anyway this could be done in reverse or another tool anyone know of?
    I was given a sprite sheet but need to edit it back into layers to add effects, etc.  I don't have access to original layers.
    But looking at the sprite sheet, I could figure out the dimensions each "sprite box" needs to be but it is a pain adding a new animations/fx over the sprite sheet to make sure it lines up for each frame.  So I'm sure someone has figured out a way to do this in reverse. Thanks.
  • mediochrea
    Offline / Send Message
    mediochrea polycounter lvl 10
    Oh god, I haven't worked on this thing for ages. Sorry everyone, some really hard times were upon me, but I might continue working on it eventually.
    Invertex said:
    AnalogKid wrote: »
    Looking forward to the CC version!
    Trunks252 wrote: »
    Just want to say thanks for the script and confirm that it works in CS6 but not CC.

    The branch hasn't been updated, yet the script is working fine for me in CC. Perhaps it was a bug in CC that has been patched?

    Anyways, great script mediochrea! It fills a need that no other software does as efficiently or quick. The other scripts out there that try to do similar, are painstakingly slow and require frame export first... eugh. Looking forward to future updates!

    Thanks man, glad you're finding it useful! And yeah, there was an update in CC that killed my workaround for moving the frames, so it didn't work for a while, but it seems that they fixed it later.
    low_polly said:
    I know this is old but this is awesome Mediochrea. Was looking for something for Photoshop CS6 too.  Thanks.
    Do you know if there anyway this could be done in reverse or another tool anyone know of?
    I was given a sprite sheet but need to edit it back into layers to add effects, etc.  I don't have access to original layers.
    But looking at the sprite sheet, I could figure out the dimensions each "sprite box" needs to be but it is a pain adding a new animations/fx over the sprite sheet to make sure it lines up for each frame.  So I'm sure someone has figured out a way to do this in reverse. Thanks.

    Hey, thanks! As for the reverse functionality, I believe that Shoebox from RenderHJS had something like that, so try it out. I might add it to the script once I get back to it though, seems easy enough.
  • rraallvv
    I created my own script for that, has a good packing ratio and a couple of nice features for you to try, check it out at https://github.com/rraallvv/Layer2SpriteSheet
    Cheers
Sign In or Register to comment.