OpenXcom Forum

Modding => Work In Progress => Topic started by: RSSwizard on August 28, 2017, 05:40:48 am

Title: PALETTE experimenting
Post by: RSSwizard on August 28, 2017, 05:40:48 am
So I pulled out my hex editor and consulted the wiki about how the palettes are arranged. And after a couple hours I churned out a modified palette. That pesky red range was the first thing to be changed but I took a bunch of creative license with it so you may not like it as-is (there are some color glitches, but it overall takes on a different kind of style).

To use it, go in your UFO/GEODATA folder, rename your PALETTES.dat to a backup, and unzip this in there. The only palette modified is battlescape.

If anyone has any wishes for custom changes I can take the stock palette and make some modifications (this takes some effort, and I tend to want to edit only the 4 colors on the light/dark ends of the range). I expect everyone is going to want the Red colors changed to include some more saturation. However I am particularly fond of the TFTD silvered/patina color range which has a yellowish-gray appearance.

The screenshots are from x-piratez, the palette image was used as a basis to sample colors from to input in hex so its almost equal to the palette in the .dat.
Title: Re: PALETTE experimenting
Post by: Solarius Scorch on August 28, 2017, 10:59:49 am
Interesting, but the palette you presented in the picture seems to be the Geoscape palette, whereas the screens are from Battlescape. Can you please clarify?
Title: Re: PALETTE experimenting
Post by: Meridian on August 28, 2017, 11:07:39 am
Interesting, but the palette you presented in the picture seems to be the Geoscape palette, whereas the screens are from Battlescape. Can you please clarify?

You mean "newxcomcolors.png" ? That's clearly NOT a geoscape palette.
Title: Re: PALETTE experimenting
Post by: Solarius Scorch on August 28, 2017, 11:12:41 am
You mean "newxcomcolors.png" ? That's clearly NOT a geoscape palette.

Well, I assumed it was a modified Geoscape, since it doesn't have the bottom blacks... But admittedly I don't understand much.
Title: Re: PALETTE experimenting
Post by: Meridian on August 28, 2017, 11:42:58 am
Well, I assumed it was a modified Geoscape, since it doesn't have the bottom blacks... But admittedly I don't understand much.

As far as I know, the palette with pink/purple bottom line is what modders decided to use instead of the BATTLEPEDIA palette (which is similar to BATTLESCAPE palette, with last row changed to support ufopedia text and cursor colors)... so that the colors from the last row are not used at all and thus work both in battlescape and ufopedia.

See attached.
Title: Re: PALETTE experimenting
Post by: Solarius Scorch on August 28, 2017, 01:34:39 pm
Yes, that is precisely what I meant.

Of course this is pretty much meaningless, since it can be used for anything that fits... But my initial question remains: what is this palette meant for? It just doesn't make sense to me...
Title: Re: PALETTE experimenting
Post by: Meridian on August 28, 2017, 01:49:35 pm
But my initial question remains: what is this palette meant for? It just doesn't make sense to me...

Not sure I understand the question.
It's meant to replace the original battlescape palette...
Title: Re: PALETTE experimenting
Post by: Solarius Scorch on August 28, 2017, 02:02:22 pm
Not sure I understand the question.
It's meant to replace the original battlescape palette...

Then why so much pink? What would it be used for? And what about the grayscale?
I just don't understand how this palette is useful, not to mention better.

(And I wouldn't accept a palette which breaks the 1 colour per row rule... It would make it useless for automated recolour. Yes, I know TFTD is like that.)
Title: Re: PALETTE experimenting
Post by: SupSuper on August 28, 2017, 04:08:56 pm
Then why so much pink? What would it be used for? And what about the grayscale?
I just don't understand how this palette is useful, not to mention better.

(And I wouldn't accept a palette which breaks the 1 colour per row rule... It would make it useless for automated recolour. Yes, I know TFTD is like that.)
The palette is the exact same as the original, just with different hue/saturation for some colors, for players that would prefer stronger colors.
The "magenta row" is just a dummy, as it's replaced with greyscale by the game.

Here's a more accurate comparison:
Title: Re: PALETTE experimenting
Post by: Solarius Scorch on August 28, 2017, 04:21:32 pm
Thanks! That explains it.
Title: Re: PALETTE experimenting
Post by: RSSwizard on August 28, 2017, 09:48:47 pm
The last row is indeed a dummy to make sure those colors aren't used, or would only be used for things like projectiles and explosions that wont be displayed in the pedia.

I made a modified version of the palette and stuck it in vanilla UFO setting (on my android phone, so I have no screenshots of that) and it worked pretty well... this version is a little nicer I guess, it jives real well with piratez because IMO it gives things a "rustic" look.

Changes include preserving the top red colors at vanilla levels so they're not too intense, though the stun bar over the health bar is still hard to make out. Turned the last row of blues (range 14?) into the same kind of teal from tftd (I find 3 ranges of blues to be highly redundant). And as I originally did there is no flat gray anymore... the first range is slightly blued, the peach gray in the middle is silver-patina yellow, the Alien Alloys gray range is a stronger blue-gray.

I think im going to leave it as it is. If I tweak anything else about it ill be modifying other game palettes (I intend on editing that geoscape blue range for the ocean to look more aqua and darker).
Title: Re: PALETTE experimenting
Post by: Dioxine on August 28, 2017, 11:19:09 pm
This palette simply rocks. The one color I am not fully happy with is the turqoise. I'd prefer a little deeper and a little more blue hue. This one just looks a tad too chemical IMO. I will really need that deep blue/greenish. However, the first green can be made more turqoise to compensate!

Keep tweaking man! This is really awesome work, kudos to you!

I'll bother Meridian some more for an ability to easily replace palettes by ruleset :)
Title: Re: PALETTE experimenting
Post by: Meridian on August 28, 2017, 11:29:13 pm
I'll bother Meridian some more for an ability to easily replace palettes by ruleset :)

Implemented a year ago: https://openxcom.org/forum/index.php/topic,4935.msg72065.html#msg72065

Already on my to-be-removed list, since no one's interested...
Title: Re: PALETTE experimenting
Post by: Dioxine on August 29, 2017, 12:07:46 am
Hell I never knew you actually implemented it... :/
Lack of documentation is a bitch.
Title: Re: PALETTE experimenting
Post by: clownagent on August 29, 2017, 10:31:18 am
Implemented a year ago: https://openxcom.org/forum/index.php/topic,4935.msg72065.html#msg72065

Already on my to-be-removed list, since no one's interested...

It is a nice feature. I used it to give the geoscape some more red colors for interception images.

The old geoscape palette had 6 times the same red, and changing these colors does not seem to break anything.
Title: Re: PALETTE experimenting
Post by: Solarius Scorch on August 29, 2017, 02:16:59 pm
I agree something can probably be done to make the reds a bit more diverse, at least. I also like the teal, but it might require some tweaking of game graphics, and this is not something trivial.
And why are the grays purplish? Is this an intended choice, or a side effect?
Title: Re: PALETTE experimenting
Post by: RSSwizard on August 29, 2017, 08:53:48 pm
This palette simply rocks. The one color I am not fully happy with is the turqoise... Keep tweaking man! This is really awesome work, kudos to you!

You mean the turquoise looks a little more VAPORwave :P
I get what you're saying about the turquoise, and I think you're right.
The 2nd range of blue in the middle will be tweaked to go to a teal fade, while the final blue range will be returned back to the kinda dark blue fade it had before.

Im thinking of moving the saturated red a little farther down on the range (maybe two indexes) so the upper 4-5 colors that things such as the health bar use will still look okay. For any objects that matter it will still do the job. I dont think an LED intensity red is exactly necessary as long as there's at least an 80% brightness saturated red, because thats what blood requires.

I changed the first green (range 4?) to be a little more desaturated at the top and become more teal to fade out. Fun tip if you select either the pale green, or the bright yellow ranges for Night Vision the effect is just amazing... fires look overwhelming while the rest of the terrain looks a little more darker than usual (ie, like it might show up on actual nightvision).

After I mess with this stuff im going to start experimenting with the other palettes. I want to get those massive plain blue oceans under control.


And why are the grays purplish? Is this an intended choice, or a side effect?

When I was changing hex values I noticed offhand that one or two of the darker gray colors were in fact some version of purple (this deviates from the displayed palette I provided for some reason). I left it as it was and actually I loved the result. It produces a scintillating kind of transition to black, its not altogether unrealistic either. Its the result of a typo, it needs to be tweaked though because the lighter (of those 2 colors?) is abit too light and I need to dim it down by half a shade if its going to remain a desaturated purple.

Picture is how I have been doing the modifications. I have a hex editor open on the photoshop palette I have saved, and I have the palettes.dat open. I have to manually divide all of the values from the photoshop palette by 4, ive done it so much that its starting to become rote. I originally used Universal Game Editor back in the 90s so im familiar with it, it displays all the values in digits and it saves addresses for easy reference/editing.
Title: Re: PALETTE experimenting
Post by: Solarius Scorch on August 29, 2017, 08:56:17 pm
Great, thanks for the answer.

Could you perhaps attach the new .dat file? I can't wait to see it. :)
Title: Re: PALETTE experimenting
Post by: RSSwizard on August 29, 2017, 10:43:36 pm
Could you perhaps attach the new .dat file? I can't wait to see it. :)
Its in the .zip

Did some more tweaking. This time I also got into the basescape palette and altered the red colors to duplicate the battlescape version. Also made the darker grays a little darker.

The list of tweaks since yesterday's version and they're looking quite prima:
* Gray - Identified dark lavender color and smoothed it out, a couple other dark grays got turned lavender but they conform better and its not as noticeable (again, it just makes the darker gray objects appear a tiny bit "dirty" and grunge).
* Red - Recopied verbatim the first 3 colors from vanilla, moved the start of the saturated values lower, smoothed out the transition from red to dark fuscha.
* Plasma Green - I desaturated this color range a tiny bit because it'll look less artificial and since most of the grass tiles in the game use these colors (rather than the "mint" green) it'll be nicer for the scenery. Slightly noticeable on the cactus in the screenshot and/or the aye phone. So green in general is slightly desaturated now compared to vanilla, but I dont think this will be a bad thing.
* Blue (range#9) - The brighter blue became brighter, the darker end became more teal. Noticeable on the "sharp guy" business uniform.
* Blue (range#14) - Pretty much returned it to the way it was before, still tweaked though.
Title: Re: PALETTE experimenting
Post by: Dioxine on August 30, 2017, 11:18:57 am
Two issues with this update: the grass is no longer vibrant green, and it looks like a cheap carpet instead. Same with the crops in the field, their hue is more like leather than proper gold.
Title: Re: PALETTE experimenting
Post by: Solarius Scorch on August 30, 2017, 11:45:34 am
Two issues with this update: the grass is no longer vibrant green, and it looks like a cheap carpet instead. Same with the crops in the field, their hue is more like leather than proper gold.

Yes, I was about to say exactly the same thing. Farm looks weird, like a permanent alien twilight or something. ;) These colours are nice, but not suitable for nature.
Title: Re: PALETTE experimenting
Post by: RSSwizard on August 30, 2017, 04:46:01 pm
Two issues with this update: the grass is no longer vibrant green

These colours are nice, but not suitable for nature.

Actually both of these are deliberate and I find them pleasant. I have always been bugged by the unnatural candy green color of the grass and the non-straw golden color of the straw. Take a look at lawns and dead grass in real life and you'll find that colors in nature are often alot less "vibrant"... grass is often darker and the parts of it which are brighter are less saturated than typically imagined. Dead grass and straw are a pale tan rather than golden. This is similar to how people imagine trees to be brown colored but in reality they're pretty much gray until you peel bark off of them.

I figured everyone knew this.

These kinds of graphics and art direction (with UFO) are precisely why I dislike the original game and loved TFTD alot better (I also played TFTD first, and only got UFO several years later).

Ive been waiting years to change that and since I did it this way I don't have to mess with altering the (entire) tileset to suit.

TL;DR - you can modify the palette back to the original greens/yellows if you like, its a smack in the face to ask me to do it.
Title: Re: PALETTE experimenting
Post by: Dioxine on August 30, 2017, 05:14:51 pm
I look through the window to see my garden in full daylight.
Yep it is still vibrant green not old carpet green.
Myth busted, RSS Wizard : )
Title: Re: PALETTE experimenting
Post by: RSSwizard on August 30, 2017, 09:19:54 pm
Yep it is still vibrant green not old carpet green.

Ill put the plasma green range back to where it was, but only for you guys. It takes a little less than an hour.
Title: Re: PALETTE experimenting
Post by: Solarius Scorch on August 30, 2017, 10:57:49 pm
Ill put the plasma green range back to where it was, but only for you guys. It takes a little less than an hour.

That would be nice, thanks.

It's not that I dislike the new green, because I do... It's just that it doesn't convey the proper feel, natural or not.
Title: Re: PALETTE experimenting
Post by: RSSwizard on August 30, 2017, 11:45:24 pm
Reset the green saturation, Fixed the straw colors (I think), fixed a little bit of other things.

Edit: it does some bad things to the defender/guardian/stormy armor scheme, its just something I noticed.
Title: Re: PALETTE experimenting
Post by: Dioxine on August 31, 2017, 05:02:16 am
It does weird things to these armors because they were poorly drawn, with no regard to palette whatsoever. As for the matte grass/wheat, the issue was lack of vibrant colors in full daylight. It should be more matte indeed in half-dark like you say, but it's hard to pull off such a thing I guess...
Title: Re: PALETTE experimenting
Post by: Solarius Scorch on September 03, 2017, 08:32:09 pm
RSS Wizard, I have added your palette to X-com Files.

Many thanks for your effort.
Title: Re: PALETTE experimenting
Post by: Meridian on September 03, 2017, 09:00:04 pm
RSS Wizard, I have added your palette to X-com Files.

Is the new one REALLY so much better?

Think of all the problems you will have sharing resources with other modders... especially the ones that are converted from 24-bit images (i.e. not handdrawn and shaded properly)... you'll be in modder hell before you can say ooops...

And if I create a slightly different one, will you take mine instead of RSSWizard's? What do you expect to gain by all this?
Title: Re: PALETTE experimenting
Post by: Solarius Scorch on September 03, 2017, 09:08:56 pm
Is the new one REALLY so much better?

Think of all the problems you will have sharing resources with other modders... especially the ones that are converted from 24-bit images (i.e. not handdrawn and shaded properly)... you'll be in modder hell before you can say ooops...

And if I create a slightly different one, will you take mine instead of RSSWizard's? What do you expect to gain by all this?

It's a bit experimental, but the prospects are tempting.

The only real difference (apart from juicier reds) is that blues are more diverse. There are three types of blues in vanilla, so I prefer to have one turned into teal. This doesn't make much of a difference and shouldn't collide with any new graphics. (New Piratez palette is a much more serious change.) And if it doesm, it's easy to revert.

And if a better palette is made... Of course, better is the bane of good. ;)
Title: Re: PALETTE experimenting
Post by: Meridian on September 03, 2017, 09:18:44 pm
There are three types of blues in vanilla, so I prefer to have one turned into teal. This doesn't make much of a difference and shouldn't collide with any new graphics.

This WILL most definitely collide with all converted graphics.

Imagine you have a picture with a gradient from light to dark blue somewhere... if it was hand-drawn, the author would (mostly) use only one shade of blue (out of the three you mentioned). After changing the palette the intensity may change a bit, but gradient and most importantly color will be preserved... so changing vanilla assets is OK.

Now take your average modding resource, converted from some cool internet graphics.
Let's say it has a blue gradient.
You've used your favorite image-processing software and it has decreased the color depth to 256 colors according to xcom palette to the best of its abilities.
Very likely, it has used all 3 blue gradients in the process.
After changing the palette (let's say one blue to teal and second blue to cyan)... you'll get a horrible mix of blue, teal and cyan barely resembling any gradient attempt at all... and kill my eyes slowly in the process.
Title: Re: PALETTE experimenting
Post by: Solarius Scorch on September 03, 2017, 10:12:00 pm
I understand all of that. I've been modding X-Com for years, I know how palettes work better than I understand my own Master thesis. :P

I am currently testing the game and haven't found any problems. If they come up, I am prepared to fix them manually.