gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Graphics > Sprite tools

#19010 - Gopher - Fri Apr 09, 2004 10:51 pm

My current project uses a set of 16-color sprites which can be used with 9 different palettes to make units of different teams. I've discovered my existing graphics tool set makes this very difficult; at the moment only 1 color changes and I actually generate the 9 different palettes from a single base copy at run-time on the GBA. I'd like the game to be able to use 256-color sprites for a few of the other sprites.

Enough explanation; my question is what graphics tools everyone uses to accomplish this. I had been using a combination of Photoshop (total overkill) and Ultimate Paint, as well as my own command-line util that converts the bitmaps into resources for the game. Unfortunately, neither of these programs seems to allow the kind of precice palette control that is needed. Photoshop lets you save and load 16-color palettes, but I can't find a way to prevent it from regenerating the actual bitmap indices to the best color-matches.

I've been making it work, but there has to be a simpler way. Before I sit and write my own gui tool to do it, I thought I'd ask what tools others use for this.

Thanks
_________________
"Only two things are infinite: the universe, and human stupidity. The first is debatable." -Albert Einstein

#19017 - tepples - Sat Apr 10, 2004 2:58 am

I use GIMP. User can create exact palettes and then tell GIMP to convert an image to indexed using that palette in its given order. Make sure to uncheck "omit unused colors" when converting using such a palette.

Notice that the automatic palette generation behavior has changed in recent versions of GIMP. GIMP 1.2.x would generate palette colors in the order that it encountered colors in the image (taking into account tile effects); color 0 would be the pixel in the upper left corner. GIMP 2, on the other hand, sorts colors according to increasing lightness, apparently to improve the performance of PNG's predictors; now color 0 is by default the darkest pixel. Of course, you can save the palettes that GIMP's indexed mode conversion creates and then edit them to rearrange the colors.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#19036 - dagamer34 - Sat Apr 10, 2004 3:17 pm

GraphicsGale is also another good editor that lets you mess with the palette.

It's sad that with all those filters and advanced algorithms, neither Jasc Paint Shop Pro nor Adobe PhotoShop have decent palette features. What is the world coming to?
_________________
Little kids and Playstation 2's don't mix. :(

#19041 - Cearn - Sat Apr 10, 2004 4:04 pm

My own bitmap editor Usenti allows precise palette control, palette-swapping and exporting to GBA C or assembly. (OK, so it's no Graphics Gale, but it gets the job done.)

But why don't you put all the 16 color sprites in 1 file, edit the palette of that file and only convert to 16 colors when you really need them to be in 16 colors? That way you don't have to update multiple palettes when you change one color.

dagamer34 wrote:
It's sad that with all those filters and advanced algorithms, neither Jasc Paint Shop Pro nor Adobe PhotoShop have decent palette features. What is the world coming to?

True-color images, that's what. (it's not called Photo Shop for nothing). Let's face it, nowadays paletted images are mainly used for buttons and smaller systems like the GBA, the rest of the world moved to true-color years ago. I'd never even seen a nice paletted image editor until I found out about GBA programming.

#19046 - Gopher - Sat Apr 10, 2004 6:16 pm

Cearn wrote:

But why don't you put all the 16 color sprites in 1 file, edit the palette of that file and only convert to 16 colors when you really need them to be in 16 colors? That way you don't have to update multiple palettes when you change one color.


That's a perfectly valid approach, and I don't think I said I couldn't. If I do that, though, I would need to ensure the different versions have the common colors at the same indices. I guess if the palette is generated from upper-left pixel, as apparently the old GIMP did it, then that wouldn't be an issue. The current arrangement has the artist just drawing the basic units and I'm changing a couple of the colors at run-time. I guess I could pretty easily write a cmd-line app just to do that - to take in a picture and rearrange the palette and reindex.


Thanks for the suggestions, though; I'll check out all three tools. One of these should do the job for now. Ultimately I'll probably break down and make my own GUI gba graphics tool, but for now I really want to avoid investing that much time in something tangent to the project itself.
_________________
"Only two things are infinite: the universe, and human stupidity. The first is debatable." -Albert Einstein

#19047 - dagamer34 - Sat Apr 10, 2004 6:24 pm

PhotoShop costs $700 and it doesn't have decent palette editing tools. Sad.

And no matter how you justify it, Adobe should have realized a long time ago that 2D artists need a program for palette-based sprites. I mean, heck, the Gameboy series has sold 100 million units. You would think someone would have turned on the light bulb and jumped the bandwagon by now.
_________________
Little kids and Playstation 2's don't mix. :(

#19048 - Gopher - Sat Apr 10, 2004 6:27 pm

wel, it's a dead-end market, though; what are the odds of the next gameboy still making such heavy use of indexed color?
_________________
"Only two things are infinite: the universe, and human stupidity. The first is debatable." -Albert Einstein

#19049 - dagamer34 - Sat Apr 10, 2004 6:38 pm

You've got a point there... Still, though, the GBA has been out for 3 years and both pieces of software have had updates since then.
_________________
Little kids and Playstation 2's don't mix. :(

#19050 - sajiimori - Sat Apr 10, 2004 6:49 pm

What do you think Adobe would say if you asked them? "Oh, we never thought of that." No, they'd say GBA developers are not their target audience. That should be clear enough.

#19061 - tepples - Sat Apr 10, 2004 9:04 pm

Gopher wrote:
I would need to ensure the different versions have the common colors at the same indices. I guess if the palette is generated from upper-left pixel, as apparently the old GIMP did it, then that wouldn't be an issue.

Remember that even with the new GIMP, you can control exactly what indexed palette gets used for the conversion by creating a palette beforehand.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.