Automatic way of converting palette

Piccolo

Well-known member
Here's the thing :

I have two different versions of the same sprite. Each sprite version has its own color palette (not just in terms of colors but in terms of positions in table, number of colors, etc). But the color of each pixel in sprite 1 correspond to the color of matching pixel in sprite 2.

Is there a tool than can automatically convert sprite 2 palette to sprite 1 format ?
 
Piccolo said:
Here's the thing :

I have two different versions of the same sprite. Each sprite version has its own color palette (not just in terms of colors but in terms of positions in table, number of colors, etc). But the color of each pixel in sprite 1 correspond to the color of matching pixel in sprite 2.

Is there a tool than can automatically convert sprite 2 palette to sprite 1 format ?

If the palettes match up then you can just save the palette as an .act in photoshop and load it onto the other image. Otherwise you'd probably have to manually edit the palette.


[attachment deleted by admin]
 
i believe that can be achieved using fight factory


example load 2 characters with the same colors but in different palette positions (example 2 colossus)

both palettes must uses the same colors(but in different positions) and you will load the palette you want into the other sprite

i dont remember how i did it some years ago but i merged the 2 invisible woman for mugen into one
first thing i did was make both match the colors in the sprites and then load the same palette into all sprites using fight factory selecting all sprites at once
but i dont remember exactly my steps
 
Well that's the problem, the palette neither match positions nor colors. If it matched positions then it would just be a remap directly usable by OpenBOR. And if it matched colors I could use PalApply to convert the palette.

So basically I need a tool that checks every pixel in sprite 1 and sprite 2, retrieves color of sprite 2 current pixel and put it in sprite 1 palette at current pixel color position. I'd be suprised if there is no existing program that can do this.

Thanks anyway.


Edit : Ok I just implemented what I just wrote in a Gimp script and it works like a charm  8) I can clean it and share it if anyone is interested.
 
You could do this with Photoshop in a twinkling. Just run a batch that converts sprite_set_2 to RGB color, converts back to index using the palette from sprite_set_1, save to .png and you're done. I don't know much about GIMP but it might be able to do that too.

DC

*Edit:* Looks like you found a way. Kind of the long trip around but so long as it worked for you. :)
 
Hum I might be wrong but I think it's different. To me, what Photoshop does when using what you describe is trying to match sprite 2 colors with sprite 1 colors, so that sprite 2 can use sprite 1 palette.

What I want (and did with the script I wrote) is transforming sprite 2 palette (keeping its original colors) so that it can be used as a remap of sprite 1.
 
Piccolo said:
Here's the thing :

I have two different versions of the same sprite. Each sprite version has its own color palette (not just in terms of colors but in terms of positions in table, number of colors, etc). But the color of each pixel in sprite 1 correspond to the color of matching pixel in sprite 2.

Is there a tool than can automatically convert sprite 2 palette to sprite 1 format ?

Yes.  It's called PalApply, and it does exactly this.
 
Damn it you're right  :o I already use PalApply quite often (which I mentionned earlier in this topic), but for some reason always believed it was meant to convert either a sprite with the same colors or the same palette format as the base sprite.

Well thanks then, it's surely more convenient and faster than the gimp script I did  :-[ ;)
 
Piccolo said:
Damn it you're right  :o I already use PalApply quite often (which I mentionned earlier in this topic), but for some reason always believed it was meant to convert either a sprite with the same colors or the same palette format as the base sprite.

Well thanks then, it's surely more convenient and faster than the gimp script I did  :-[ ;)

Wait, I am?  Now that I've read the thread more carefully, it doesn't look like I understood the question the first time.
 
Plombo said:
Piccolo said:
Damn it you're right  :o I already use PalApply quite often (which I mentionned earlier in this topic), but for some reason always believed it was meant to convert either a sprite with the same colors or the same palette format as the base sprite.

Well thanks then, it's surely more convenient and faster than the gimp script I did  :-[ ;)

Wait, I am?  Now that I've read the thread more carefully, it doesn't look like I understood the question the first time.

Ah no indeed, you were not. The PalApply result seemed ok when I checked it in an image editor but when I check it ingame it is displayed with sprite 1 colors instead of sprite 2.
 
Yeah, that's what I thought. :(  Mind sharing that GIMP script?  Could come in handy sometime.
 
Here it is.

It's a python gimpfu script. In Linux I put them in /home/USER/.gimp-2.8/plug-ins/ folder and then when I reload gimp it's available in the toolbar's MyScripts menu.

The script applies on the current image and uses the last opened image as color reference. Current image becomes last opened image while keeping its own palette structure.
 
Back
Top Bottom