Program to make 1 big texture.

Started by
5 comments, last by try_catch_this 18 years, 10 months ago
I have a bunch of small images that i would like to make one texture of to save on binding calls. Anyone know of a program that can do this already or do I have to make one myself? And manually doing it would be very tedious. [Edited by - try_catch_this on June 15, 2005 4:06:06 AM]
Advertisement
Writing it yourself isn't that hard. Especially if you've got a decent prototyping language to use, like VB (which has lots of image loading support, and BMP save support; converting to PNG/etc is for real tools) or even, in a pinch, PHP + the GD library.
RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.
you could use GD library within a compiled c++-based program
You could keep your textures in individual files, and just join them all together at runtime (as a one-off operation, using the CPU). This would make it easy to find the right one, as you could store the coordinates (or id) of each individual file in some data structure for easy access later.

Or you could run a batch process - for example using ImageMagick's commandline "montage" program to stitch them together appropriately. You'll need to script this and ensure that your program has data at runtime which enables it to find the right part of the texture.

Personally I might use that approach - using ImageMagick to montage all files in the directory (in alpha filename order), then a script which lists the files and creates a .h file containing constants (or maybe an enum) with the filenames in, so you can refer to them at runtime without too much effort.

What I've done before, is store each frame of an animated texture in similar filenames (explosion00, explosion01 etc), so that when they're sorted into alpha order, they come out in the right order. I then just refer to the ID of the first one and add an offset for the animation frame number.

Mark
What is this GD libary?
http://www.boutell.com/gd/
If this program does what it says it can do it rox!
imagemagick

Thanks for saving me rewriting the wheel. (and making a worse one at that)

This topic is closed to new replies.

Advertisement