PDA

View Full Version : Tool for paging up animated sprites?


Dock
11-16-2005, 10:20 AM
Is there a tool available for paging up 2D sprites on to larger bitmap sheets?

For example, sixteen 64x64 images that I want to page up on a single 256x256 sheet. If I have individual images, is there a tool that will page them up? They are all the same size.

monco
11-16-2005, 10:30 AM
I asked the same question in a different forum and was recommended this:

http://www.imagemagick.org/script/index.php

Disclaimer: Never tried it myself.

oNyx
11-16-2005, 10:31 AM
Imagemagick can do that kind of stuff.

montage -background "transparent" -depth 8 -type TrueColorMatte foo_??.tga -geometry 64x64 -tile 4x4 -matte -transparent "transparent" -type TrueColorMatte -depth 8 foosheet.png

Eg that creates a 4x4 grid sheet (256x256 pixels) out of foo_00 to foo_15 (which are 64x64 pixels each).

Sysiphus
11-16-2005, 12:52 PM
this can be useful

http://turbo.gamedev.net/2000_03_12_issue.asp
http://www.aswsoftware.com/products/imagetoavi/imagetoavi.shtml
http://www.bottomap.com/Software/A4B/A4B.html
http://www.divx-digest.com/software/bmp2avi.html
www.irfanview.com

Dock
11-22-2005, 08:51 AM
I forgot to reply to this, sorry!
Thanks to everyone for the help.

The GlueIt program seems to do the job perfectly, and it's easiest to use. It seems to stick all the images together side-by-side, which is less desirable than them being paged into a tile formation. It works though. Thankfully Blitz3D seems perfectly happy receiving animation sequences in this format, and converts them to something sensible within the engine upon loading.

I've tried a 4096x64 animation strip, and it works great. :)

kolka
11-22-2005, 09:34 AM
What so bad in storing the images in individual files?

oNyx
11-22-2005, 10:23 AM
What so bad in storing the images in individual files?

There are several reasons to use sheets. There is the per file overhead (file header + archive header), compression schemes can compress better if there is more data to play with and browsing your project's assets is also easier.

However, the real reason to use sheets is that texture binds are a rather expensive operation. So, if you want to draw 20 explosions you would have 20 binds in the worst case. Whereas you have only 1 bind if you use a sheet. You bind it once and draw em all. You can easily gain 10% more speed if you just minimize the texture context switches and sprite sheets are a very simple yet effective way to do that.