aliens

Author Topic: Palettes  (Read 7077 times)

Offline Docent

  • Colonel
  • ****
  • Posts: 101
    • View Profile
Palettes
« on: September 10, 2019, 11:39:16 pm »
I've tried. I rummaged through the entire forum. I tried different tools. But the result is poor quality. How, how to bring colors in pictures to the required palettes ?! I tried Photoshop and the palettes from the forum, it turns out in half the cases and so-so (examples in the attachment, I'm not sure that I'm doing everything right, because I'm not a Photoshop specialist). I tried to use the Falko's online tool, it doesn’t work out at all, maybe I'm doing something wrong? Please explain step by step if there is a way to quickly and efficiently convert the colors of the picture to the required? If possible, then on a concrete example: there are pictures of armor, everywhere everything is fine, but not in ufopedia. How to fix?
« Last Edit: September 11, 2019, 09:17:57 am by Docent »

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Palettes
« Reply #1 on: September 11, 2019, 12:22:50 am »
I tried it on Falko's Palette tool and I think it worked.

Make sure to set it to fix-palette (ufo-battlescape).

Also be aware that the resulting image will be a .png file.

From what I've read some OS have trouble with .gif when using
OpenXcom so perhaps .png will serve you better?

EDIT:
everywhere everything is fine, but not in ufopedia. How to fix?
The ufopedia has a different pallete I think.

But if it is an Armor display I believe there is a special command you can give it that loads it differently along with displaying the armors stats... which you appear to have already done and it is giving you the error.

Try loading the image as a .png and see if that changes anything?


EDIT:
Disregard my above comments, I just tried viewing the .png and I'm also seeing the corruption.
« Last Edit: September 11, 2019, 12:49:18 am by The Martian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9089
    • View Profile
Re: Palettes
« Reply #2 on: September 11, 2019, 08:50:17 am »

Offline Docent

  • Colonel
  • ****
  • Posts: 101
    • View Profile
Re: Palettes
« Reply #3 on: September 19, 2019, 01:43:58 pm »
Thanks, now it’s getting better.

wcho035

  • Guest
Re: Palettes
« Reply #4 on: September 22, 2019, 06:56:26 am »
Hi Meridian, is there a better palette for TFTD battlescape closer to the vanilla TFTD version you know of? Like someone is experimenting? Aside from those packaged with OXCE?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9089
    • View Profile
Re: Palettes
« Reply #5 on: September 22, 2019, 07:58:25 am »
Hi Meridian, is there a better palette for TFTD battlescape closer to the vanilla TFTD version you know of? Like someone is experimenting? Aside from those packaged with OXCE?

The ones packaged with OXCE are the vanilla TFTD palettes.

If you want to experiment, OXCE allows you to use any custom 8bit palette.

wcho035

  • Guest
Re: Palettes
« Reply #6 on: September 22, 2019, 08:14:45 am »
As always, thanks for the info Meridian.

Offline Skybuck

  • Colonel
  • ****
  • Posts: 223
    • View Profile
Re: Palettes
« Reply #7 on: May 14, 2022, 07:11:31 pm »
The battlescape palette: https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/bin/common/Palettes/UFO-JASC-SAFE/PAL_BATTLESCAPE_SAFE.pal

How come the first color is 0, 255, 0 ? and not 0, 0, 0 ? transparent ?

Oh never mind, it seems, index 15 is zero, zero, zero ?

Or am I reading this palette the wrong way around ?:

https://openxcom.org/forum/index.php?topic=5021.0

https://www.ufopaedia.org/images/2/2c/Palette.gif



This image/palette.gif does not match the values posted on that github link...
« Last Edit: May 14, 2022, 08:05:12 pm by Skybuck »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Palettes
« Reply #8 on: May 14, 2022, 07:23:26 pm »
"color" of first index do not matter, for most of OXC and all OXCE index 0 is consider a transparent color.
Another thing this palettes are for graphic programs as at least OXCE use only indexes and ignore palettes given in file.

Offline Skybuck

  • Colonel
  • ****
  • Posts: 223
    • View Profile
Re: Palettes
« Reply #9 on: May 14, 2022, 08:06:32 pm »
"color" of first index do not matter, for most of OXC and all OXCE index 0 is consider a transparent color.
Another thing this palettes are for graphic programs as at least OXCE use only indexes and ignore palettes given in file.

The values posted here:

https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/bin/common/Palettes/UFO-JASC-SAFE/PAL_BATTLESCAPE_SAFE.pal

Are they used in OpenXcom vanilla as well ? Or are these values totally different in vanilla in battlescape ?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9089
    • View Profile
Re: Palettes
« Reply #10 on: May 14, 2022, 08:30:40 pm »
The actual palette used in "OpenXcom vanilla" (and also in OpenXcom Extended) is this one: https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/bin/common/Palettes/UFO-JASC/PAL_BATTLESCAPE.pal

It differs from https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/bin/common/Palettes/UFO-JASC-SAFE/PAL_BATTLESCAPE_SAFE.pal
only in the first index (index 0)

The "real" one has [0,0,0] as first index (index 0), the "safe" one has [0,255,0] as first index (index 0)... to make it clearer and easier for modders.

As Yankes already said, the color of the first index (index 0) doesn't matter at all, because it is completely ignored and considered transparent.
So you can put any color there as you want.
I chose bright green so that it doesn't get confused with (non-transparent) black, which is already present at index 15.
« Last Edit: May 14, 2022, 08:33:30 pm by Meridian »