Skip navigation
Currently Being Moderated

CS6 Sprite Sheet animation alignment puzzle

Jun 11, 2013 4:14 PM

Tags: #animation #flash_cs6 #spritesheet

Hey all, I greatly enjoy using Flash CS6's Generate Sprite Sheet tool since it's much much quicker than exporting all the sprites and using TexturePacker (though I wager TP would provide far better optimization). One problem I seem to have is aligning different animations to the same origin - which isn't the origin of the sprite (top left corner).

 

Say my character Jim has two animations:

Run (small sprites, as he runs in place)

Jump (short and tall sprites, and a bit wider than the Run)

 

I currently generate a sprite sheet by highlighting both clips and right clicking. This gets me a perfect Sprite Sheet with both animations and their respective names (based on MC name). The Run and Jump frame sizes are different, because the Jump sprites are taller than the Run sprites -- this all makes sense.

 

What doesn't is that there's zero information on how those two animations should be placed such that Jim can go from playing his run animation and then his jump animation with his feet in the same place, despite the fact that if you inspect either of those clips Jim is standing right at Flash's little origin point at the start of both.

 

Sure, the data file (JSON in my case) has all the offsets for placing the individual frames in the right place, but how do I align Jim's feet from one set of frames to the next without having to do it all by hand? To date the only workaround I've found is to dump all the animations into a single timeline such that they all take the same frame size, but this is TERRIBLE for managing sprites and animations since it gives all the frames the same name as the combined timeline.

 

What I really need is another set of numbers in the Sprite Sheet data file that tells me the frame x & y offset from Flash's movieclip origin. I have a suspicion this doesn't exist and is impossible.

 

At a loss here other than aligning each animation's frame by hand, which may have to be done every time an interal sprite changes size.

 

Thanks for any insight, none of the Adobe pages or demos go into any depth other than creating a sprite sheet of a single image or animation.

 
Replies
  • kglad
    72,213 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 11, 2013 5:04 PM   in reply to DishesAreDoneMan

    using sprite sheets doesn't relieve you from the obligation to design your animations so they can be integrated. 

     

    typically, your running animation would be able to jump only from certain frames (where at least one foot is on the ground).  your jump animation might have 3 start jump frames, one with both feet on the ground (to mesh with a standing jump), a left foot on the ground and a right foot on the ground.  transitioning from the running animation to the jump animation should be controlled by your last run animation frame and first jump animation frame.  everything needs to be aligned so it looks seamless when you change from one animation to another.

     
    |
    Mark as:
  • kglad
    72,213 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 11, 2013 6:19 PM   in reply to DishesAreDoneMan

    the accompanying xml should specify the registration point of each sprite.

     
    |
    Mark as:
  • kglad
    72,213 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 11, 2013 9:49 PM   in reply to DishesAreDoneMan

    you're correct.  using spritesheets loses reg point information.

     

    i never noticed because i always use 0,0 reg points and position using code but that's not very handy for designers.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points