Author Topic: [SOLVED] Small problem with the palette.  (Read 6756 times)

Offline SeanEBlog

  • Sergeant
  • **
  • Posts: 34
  • https://openxcom.org/forum/index.php?topic=1266.0
    • View Profile
[SOLVED] Small problem with the palette.
« on: May 19, 2013, 07:33:54 am »
Solution here.

------------------------------------------
I've been wanting to try my hands at making custom graphics for X-Com. However I've run into a slight, possible esoteric problem.

I extracted the sprites using and pckview and loaded them into my editor of choice, paint.NET. I then took the battle palette image from the wiki and put it into the same image. Nifty thing about PDN, if you set tolerance to zero and shift click a pixel with the wand tool, it will select every pixel of the same exact color. Here's where I run into my problem.

The extracts and the palette don't match by the slightest of shades. For example, the black from the pckview is 04040C, while the black from the wiki image is 000000.

So either pckview is being unfaithful or the wiki image is. Does anyone know the answer or am I looking at a non-issue? I'd like to be able to use any color from the game palette I want without looking up a different sprite first.
« Last Edit: May 20, 2013, 03:38:16 am by SeanEBlog »

Volutar

  • Guest
Re: Small problem with the palette.
« Reply #1 on: May 19, 2013, 10:52:10 am »
More chances the wiki image is screwed. It's obvious from your screenshots that grey scale is not that grey. Some colors tinted to pink and some to green. Same thing with other gradients.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Small problem with the palette.
« Reply #2 on: May 19, 2013, 12:32:31 pm »
it's the wiki image.
i can provide the palettes in standard .ACT format, or via PNGs containing only palette info, whichever you prefer, let me know.

Offline SeanEBlog

  • Sergeant
  • **
  • Posts: 34
  • https://openxcom.org/forum/index.php?topic=1266.0
    • View Profile
Re: Small problem with the palette.
« Reply #3 on: May 19, 2013, 10:14:48 pm »
Let's go with the PNG, thanks.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Small problem with the palette.
« Reply #4 on: May 19, 2013, 11:12:38 pm »
here's the three main ones.

Offline SeanEBlog

  • Sergeant
  • **
  • Posts: 34
  • https://openxcom.org/forum/index.php?topic=1266.0
    • View Profile
Re: Small problem with the palette.
« Reply #5 on: May 20, 2013, 02:56:50 am »
It turns out I'm idiot who remembered that he could extract palettes directly from files using Irfanview after getting a usable swatch out of the file you posted.
And as it turns out, every single bmp that pckview produced had exactly what I needed.



I've tested this png extensively. It is the pckview's battlescape palette with absolute fidelity.

Oh and the palette that you gave me was off as well. It actually producing hits but when combined with xcom graphics, it was producing 261 unique colors.

Combining the 2 palettes actually produces 363 unique colors. That's 107 off color entries.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Small problem with the palette.
« Reply #6 on: May 20, 2013, 03:05:00 am »
it's probably a difference between how bb's toolkit extracts the palette info and how pckview does it. in any case, the actual colours themselves are irrelevant, it only uses the raw references to palette indexes, so a "near enough" palette is "good enough" for you to eyeball what's going on, as long as it's in the correct order, as mine are.

for what it's worth: the first palette index will ALWAYS be treated as transparent, at least in the above 3 cases.
« Last Edit: May 20, 2013, 03:09:30 am by Warboy1982 »

Offline SeanEBlog

  • Sergeant
  • **
  • Posts: 34
  • https://openxcom.org/forum/index.php?topic=1266.0
    • View Profile
Re: Small problem with the palette.
« Reply #7 on: May 20, 2013, 03:10:41 am »
I understand that but this allows me to make graphics with no worries whatsoever using Paint.NET as my editor. I just didn't want something like this happening to me.