Resources and Support
 Pixel Joint Forum : The Lounge : Resources and Support
Message Icon Topic: Color match/reduction across a whole character Post Reply Post New Topic
Author Message
zeroes
Seaman
Seaman


Joined: 24 November 2014
Online Status: Offline
Posts: 2
Quote zeroes Replybullet Topic: Color match/reduction across a whole character
    Posted: 24 November 2014 at 7:15pm
Hi Guys,

Got a bit of an issue here that hopefully one of you can help solve. I've come up with a solution that works but is problematic. Anyway, I'll start with the problem.

Our artist hasn't been restricting the use of colors when creating our character frames. The colors are similar but have variants across frames. Basically they are different shades. For example the character standing is 48 colors, but when all movements are combined it's 114, yet looks the same. We should be able to reduce the colors to 64 across the board to save memory and for consistency and other reasons I won't go into detail here.

The problem is how to do this? We have around 200 frames per character as separate PNG files. The colors need to be consistent across all the files. Is there a program or method to automate this?

This is the method I have come up with:

1. Import all frames of character to photoshop as frame animation
2. Save for web as a GIF and reduce colors to 128 or 64 as needed.
3. Reimport GIF file to photoshop. Export the frames as PNG's.
4. Use tinypng or PNGoo to optimise the PNG file size.

The big issue here is that the frames will not keep their naming conventions. It will no longer be "standing001.png" etc. for each action which adds a lot of work going through and renaming each set of animations.

Edited by zeroes - 24 November 2014 at 8:57pm
IP IP Logged
jalonso
Admiral
Admiral
Avatar

Joined: 29 November 2022
Online Status: Offline
Posts: 13537
Quote jalonso Replybullet Posted: 24 November 2014 at 8:29pm
Depending on the PS version you use there is an extension for PS that allows you to retain file names and even number those that are not.
I do not recall the name of it because it was never useful to me and deleted long ago.

There are scripts you can add to recorded actions too that can address your problem but unsure how to add scripts to recorded actions. Just something I've read and heard of but never have done.

That said a simple recorded action can handle all that with that file name extension.
You can even optimize within PS in the 'save for web' option that can be part of the action.
IP IP Logged
zeroes
Seaman
Seaman


Joined: 24 November 2014
Online Status: Offline
Posts: 2
Quote zeroes Replybullet Posted: 24 November 2014 at 8:47pm
I'm on CC. Right, but the problem is the color reduction needs to be done first across the board for a uniform pallet. This can only be done with all the frames as one animated gif. The gif will not keep any of the naming conventions when reimported. It will just be separate layers.
IP IP Logged
eishiya
Commander
Commander
Avatar

Joined: 04 August 2022
Online Status: Offline
Posts: 1109
Quote eishiya Replybullet Posted: 25 November 2014 at 5:14am
It sounds like what you need to do is save a palette file of the desired palette and then reduce each file (without converting them to animations) to the number of colours in that palette (by switching from RGB to Indexed, which might mean switching to RGB first), using the palette as the "Forced" colours during the conversion. Since the forced colours will leave no room for PS to put in other colours, the files will be converted to identical palettes. Then, just save that file, which will preserve the file name (make copies of the originals in another directory, just in case). This is something you should be able to do with a recorded action applied to a batch of files, no need for a script.


Edited by eishiya - 25 November 2014 at 5:30am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum