Game Development Community

Creating sprites outside of Torque 2D, then just import to Torque?

by SlowDaddie · in Torque Game Builder · 11/04/2009 (12:28 am) · 2 replies

Does anyone know of any software I can download that will convert an image sequence into an animated sprite that can be imported in to Torque 2D?

I'd rather use an external tool that specially creates sprites from images and just import the sprite into Torque, isntead of using Torque itself to create the sprite from a cell sheet.

The reason being is that I'm having a bizzare problem with some of my animated sprites "jittering". The character will slowly slide to the right instead of staying still (for an Idle animation), then pop back to the left when the animation re-starts the loop. It doesn't do that for all of the animated sprites, just some of them.

Currently, I create the animation in 3D. Then I render each frame as a PNG. I'll normally take all the frames into photoshop so I can crop them (I've also tried NOT cropping them, still got the same jittering). I use the "action" function in Photoshop so it takes the same exact dimentions of cropping each PNG. Afterward, I open up "Glue It," add all the frames, then press GlueIt. It automatically formats all the PNGs into a cell sheet. I take the cell sheet into Photoshop so I can resize the image (Torque will crash if the image is larger than 700K, or a Y dimension of 2048 pixels). The cell sheet itself looks fine. All the frames are aligned perfectly. When I finally get the cell sheet into Torque, however, the sprite jitters and slides.

Thanks for any suggestions!

#1
11/04/2009 (8:36 am)
ImageMagick. It can remove borders from sprites (follow the colour of the background) and re-add borders of a specific size, then tile together frames in a grid, all in one or two commands. It's not graphical, but you will most likely have a set of graphics perfect for a batch job :)

Search for ImageMagick, and you'll find some other posts on it here.

Option 2, if you're a clickmonkey: SpriteWorks 2. Takes a 3D model and renders perspective views of each frame in an animation to generate a sprite sheet.
#2
11/04/2009 (9:16 am)
Have you tried adjusting the cell width in TGB? If that's a pixel too wide, each cell will too far to the right. The problem will accumulate, with each cell in the sequence starting one more pixel "out" than the one before, so when you play back the sequence the contents will appear to be sliding to the left - just as you describe.

Edit: Oops, you said your sprites are sliding to the right! Same principle, but it results from the cell width being too narrow, rather than too wide.