Hey Guys,
Do any of you have experience in creating prerendered sprites for 2d engines? I have experience creating them for mobile devices using VERY small palettes to swap colours and online games that didn't really require palette swapping....however in this case my mind is drawing a blank.
My question is how am I supposed to create a prerendered character sprite and be sure that all of the colours would remain the same? Woul I more or less be applying constant colours to appropriate clusters of polygons, thus faking texturing? Would I texture the character and, somehow, reduce it's colours to a certain number (say 64 or something) and define the colours by their entry number? Something involving alphas perhaps? Or something else?
Think of something like Baldur's Gate. I know the general idea of what I need to do but have just never applied it to something at this scale. Any help would be GREATLY appreciated.
Sorry if this is overly simple, again, I'm just not sure what method to take.
Thanks,
Gav
Replies
What I would suggest is exporting each render to a TGA file, and then crating your palette in Photoshop. Use the batch processing to load each file in the output folder, and change it to the correct palette (oh, and render with NO anti-aliasing!). There will still be clean-up, but this should do the job.
I'm thinking that i'll follow that method, Rick. What I used to do for mobile sprites was create them however I wanted, sometimes taken from a more complex 3d image, then run them through Debabelizer to get the right palette...then just alter any colour changes we'd need with palette swapping (using palettes create in Debab.) My main concern was wondering how I was going to get higher detail down to a set amount...I guess crunching down the colours is the best solution? Also, do any of you know about using alphas as a method to recolour the sprite rather than using predefined colours (such as red for skin, green for hair, yellow for clothes, etc.)?
Thanks again,
Gav
For colorizing, you might try setting up the palette carefully, then simply by swapping a tiny palette file you get all new colors, exactly where you want them, across all the frames of animation.
Render the character in passes... one of just the clothes in grayscale with all other parts flat black, another pass of just skin, etc.
Then you'll need a tool that lets you palettize and allocate a portion of the palette to those specific parts. Like clothing gets palettized down to 26 colors of gray, then you stuff it into only the palette entries 0-25, with all the rest empty (black). Then make a new palette with only entries 25-50 and load the gray-rendered "skin" parts into it. Then merge the two images into the same palette. Etc. until you have every part in its own palette range, and all of them loaded into a single sequence. Make sense?
Then once you have the pixels allocated to specific ranges, find another tool to massage the palette color variations. Like using the same layout but different gradients within each section. Like 0-25 could be a green gradient ramp for forest warriors in one palette, but a red ramp in the fire-warrior palette.
I actually enjoyed it, it was a cool tech challenge. There's a lot you can do with palettes. Lucas did a really cool desktop calendar way back when that used swapped-palettes for animation, water fx, clouds moving, wind rippling grasslands, etc. Amazing stuff.
There are other ways too, like using separate masks (alpha) to confine the tinting to. But that uses more memory, since each mask has to be a sequence animating alongside the main character sequence.