Author Topic: Chaingun remodel and palette fail  (Read 19109 times)

Offline Starving Poet

  • Colonel
  • ****
  • Posts: 265
    • View Profile
Re: Chaingun remodel and palette fail
« Reply #15 on: September 17, 2016, 10:42:56 pm »
Example of greyscale palette (standard battlescape palette, where R, G, B = max(R,G,B) from original palette).


Man, I feel like I'm playing XCOM on a graphing calculator :-p

Offline H0lyD4wg

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Re: Chaingun remodel and palette fail
« Reply #16 on: September 18, 2016, 07:29:49 am »
This is how it could look like.
Btw. the numbers down there are the current battlescape palette as a starting point.

Code: [Select]
customPalettes:
  - type: PAL_BATTLESCAPE_COPY
    target: PAL_BATTLESCAPE
    palette:
      0: [0,0,0]
      1: [252,252,252]
      2: [232,232,232]
      3: [216,216,216]
      4: [196,196,196]
      5: [176,176,176]
      ---- snip ----

Considering that current palettes are made up of 16 colors with 16 shades each, wouldn't the palette definition be more readable if it was indexed by two hexadecimal digits rather than decimal numbers? That way anyone working on a palette can easily mentally parse e.g. '4F' as 'darkest shade of 5th color'.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9093
    • View Profile
Re: Chaingun remodel and palette fail
« Reply #17 on: September 18, 2016, 12:53:16 pm »
I am using IrfanView to export palettes I am using for testing, and it exports it in a format very similar to this.
That's the only reason.

Btw. one example of custom palette in Bootypedia ;-)

Code: [Select]
extraSprites:
  - type: BIG_CHARIOT
    singleImage: true
    width: 320
    height: 200
    files:
      0: pachyderm.png
customPalettes:
  - type: PAL_PACHYDERM
    target: PAL_UFOPAEDIA
    palette:
      0: [181,230,29]
      1: [28,23,46]
      2: [34,26,48]
      3: [33,26,45]
      4: [35,27,50]
      5: [37,29,51]
      6: [32,27,49]
      7: [30,22,45]
      8: [31,23,47]
      9: [27,20,44]
      10: [33,25,48]
      11: [30,25,48]
      12: [30,25,46]
      13: [37,32,54]
      14: [34,29,52]
      15: [40,32,51]
      16: [35,28,46]
      17: [38,35,57]
      18: [41,38,60]
      19: [48,41,58]
      20: [37,31,48]
      21: [43,37,52]
      22: [50,45,64]
      23: [41,28,46]
      24: [42,33,55]
      25: [156,116,74]
      26: [56,50,64]
      27: [60,57,76]
      28: [48,32,47]
      29: [44,42,64]
      30: [49,39,52]
      31: [58,53,72]
      32: [150,112,73]
      33: [52,49,71]
      34: [37,25,42]
      35: [143,107,72]
      36: [133,59,68]
      37: [97,77,63]
      38: [111,86,65]
      39: [134,102,74]
      40: [139,75,83]
      41: [64,54,66]
      42: [235,222,201]
      43: [97,39,50]
      44: [106,80,58]
      45: [73,60,62]
      46: [238,226,207]
      47: [167,127,82]
      48: [56,36,49]
      49: [69,58,71]
      50: [148,109,65]
      51: [141,50,57]
      52: [146,59,63]
      53: [121,39,51]
      54: [78,73,91]
      55: [173,40,53]
      56: [71,62,79]
      57: [130,67,76]
      58: [153,118,83]
      59: [64,46,60]
      60: [138,107,81]
      61: [150,90,98]
      62: [159,120,78]
      63: [111,49,60]
      64: [104,44,55]
      65: [88,71,72]
      66: [87,43,55]
      67: [125,97,69]
      68: [130,37,50]
      69: [54,47,56]
      70: [82,66,63]
      71: [90,75,86]
      72: [161,120,66]
      73: [160,84,89]
      74: [184,84,86]
      75: [118,92,68]
      76: [140,104,65]
      77: [116,87,60]
      78: [132,99,65]
      79: [122,60,69]
      80: [148,83,91]
      81: [83,50,61]
      82: [172,109,121]
      83: [71,67,86]
      84: [121,51,61]
      85: [175,131,84]
      86: [83,68,81]
      87: [161,93,98]
      88: [123,96,78]
      89: [108,84,78]
      90: [149,38,51]
      91: [56,41,58]
      92: [113,67,74]
      93: [64,53,57]
      94: [95,79,76]
      95: [73,51,63]
      96: [127,102,84]
      97: [151,49,57]
      98: [113,41,51]
      99: [64,39,54]
      100: [79,57,71]
      101: [130,53,60]
      102: [172,82,84]
      103: [175,117,128]
      104: [113,77,90]
      105: [111,56,66]
      106: [155,115,65]
      107: [90,58,70]
      108: [165,106,118]
      109: [146,112,79]
      110: [158,38,51]
      111: [189,76,77]
      112: [140,36,50]
      113: [78,66,72]
      114: [89,71,60]
      115: [169,96,102]
      116: [104,82,68]
      117: [129,77,87]
      118: [140,69,74]
      119: [64,61,82]
      120: [118,88,75]
      121: [114,95,86]
      122: [160,124,86]
      123: [157,106,119]
      124: [124,93,62]
      125: [74,44,57]
      126: [176,130,69]
      127: [91,82,99]
      128: [93,49,61]
      129: [182,44,56]
      130: [125,109,122]
      131: [102,59,71]
      132: [121,72,79]
      133: [179,110,121]
      134: [135,44,54]
      135: [145,114,87]
      136: [47,27,42]
      137: [172,101,109]
      138: [138,85,94]
      139: [182,135,72]
      140: [135,107,91]
      141: [134,118,131]
      142: [126,87,97]
      143: [165,124,74]
      144: [103,86,96]
      145: [148,99,110]
      146: [138,93,105]
      147: [178,76,78]
      148: [176,90,93]
      149: [160,100,109]
      150: [79,61,56]
      151: [102,75,87]
      152: [97,88,107]
      153: [181,137,92]
      154: [159,50,59]
      155: [115,84,97]
      156: [96,69,65]
      157: [101,67,77]
      158: [62,46,48]
      159: [116,102,115]
      160: [154,120,93]
      161: [125,104,98]
      162: [202,152,92]
      163: [75,38,51]
      164: [183,124,133]
      165: [73,54,51]
      166: [83,78,97]
      167: [166,37,50]
      168: [102,55,59]
      169: [186,115,124]
      170: [149,77,81]
      171: [144,93,84]
      172: [163,113,126]
      173: [111,94,102]
      174: [157,75,80]
      175: [68,33,46]
      176: [148,107,121]
      177: [228,198,185]
      178: [106,34,47]
      179: [233,212,192]
      180: [86,37,46]
      181: [166,77,76]
      182: [106,96,114]
      183: [99,72,51]
      184: [140,114,100]
      185: [239,216,199]
      186: [165,130,96]
      187: [191,144,96]
      188: [133,76,68]
      189: [197,90,87]
      190: [136,101,115]
      191: [222,184,177]
      192: [149,65,73]
      193: [187,96,99]
      194: [160,137,144]
      195: [89,60,50]
      196: [196,146,81]
      197: [194,129,137]
      198: [188,149,124]
      199: [126,94,108]
      200: [174,137,106]
      201: [152,121,104]
      202: [156,130,117]
      203: [131,87,78]
      204: [202,137,142]
      205: [169,125,65]
      206: [202,156,109]
      207: [162,64,70]
      208: [184,107,115]
      209: [169,138,123]
      210: [203,148,153]
      211: [168,126,138]
      212: [58,29,43]
      213: [100,89,84]
      214: [195,160,135]
      215: [186,128,112]
      216: [198,121,125]
      217: [179,109,104]
      218: [151,122,132]
      219: [169,107,92]
      220: [139,119,112]
      221: [193,141,147]
      222: [189,139,67]
      223: [189,145,111]
      224: [148,84,68]
      225: [154,103,93]
      226: [230,194,164]
      227: [218,166,167]
      228: [169,122,106]
      229: [206,104,96]
      230: [204,162,163]
      231: [202,169,145]
      232: [146,130,143]
      233: [157,92,79]
      234: [177,151,136]
      235: [115,66,55]
      236: [212,153,156]
      237: [173,52,62]
      238: [183,134,142]
      239: [195,109,115]
      240: [188,155,158]
      241: [212,168,128]
      242: [190,59,66]
      243: [236,208,177]
      244: [208,178,154]
      245: [208,175,172]
      246: [211,192,169]
      247: [223,169,148]
      248: [171,147,155]
      249: [222,188,144]
      250: [217,122,114]
      251: [214,147,130]
      252: [179,179,155]
      253: [210,207,184]
      254: [147,153,130]
      255: [117,127,106]
« Last Edit: September 30, 2016, 04:20:03 pm by Meridian »

Offline clownagent

  • Colonel
  • ****
  • Posts: 380
    • View Profile
Re: Chaingun remodel and palette fail
« Reply #18 on: September 18, 2016, 04:54:26 pm »
I am using IrfanView to export palettes I am using for testing, and it exports it in a format very similar to this.
That's the only reason.

Btw. one example of custom palette in Bootypedia ;-)



The Ufopedia image with the custom pallete looks very nice. However, would it not be much easier if the ufopedia would just take the palette encoded in the images themselves. You would save a lot of ruleset text and you were no longer limited by original ufopedia palette.

This is how it works already for cutscene images in openxcom. So the code for doing this must already be there.
You just have to use 256 color indexed images.
(I think you can for some reason only use 224 or so for the cutscene images, because the last colors are used for something else).

 

« Last Edit: September 18, 2016, 09:05:35 pm by clownagent »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9093
    • View Profile
Re: Chaingun remodel and palette fail
« Reply #19 on: September 18, 2016, 06:38:07 pm »
Palette is global for entire screen, not only for its parts.
This is a very simple one, with just background picture and some text... but you can already see that if I am taking the palette from the picture, the text will be broken.
In more complicated scenes with dozens or even hundreds of components on the screen (e.g. battlescape) this makes no sense.
I didn't check the cutscenes, but it is possible there only because the whole screen is only one single picture at a time and nothing else.

PS: the palette in the example is also global, not tied to the image... i.e. you need to define it only once... you can see it's a separate element, not within the picture

PS2: can you please remove the quote from your post? quoting several hundreds lines of text and a big picture is really pointless...
« Last Edit: September 18, 2016, 06:41:44 pm by Meridian »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9093
    • View Profile
Re: Chaingun remodel and palette fail
« Reply #20 on: September 18, 2016, 07:19:16 pm »
That'd be great :) A tiny detail: would it be possible to set map background color as well? (right now it's color 15, but undersea would look much better if the now-black areas were actually deep-blue... :)

Yeah, I can change that, but not sure if that's what you want (attached example with color 218 instead of 15).

The unexplored terrain is still drawn over the background, with maximum shade/darkness and will be black (unless you change palettes, I think).

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Chaingun remodel and palette fail
« Reply #21 on: September 18, 2016, 08:29:25 pm »
Considering that current palettes are made up of 16 colors with 16 shades each, wouldn't the palette definition be more readable if it was indexed by two hexadecimal digits rather than decimal numbers?
You can write hexadecimal in YAML format : use prefix 0x, for example 0xFF = 255

Offline clownagent

  • Colonel
  • ****
  • Posts: 380
    • View Profile
Re: Chaingun remodel and palette fail
« Reply #22 on: September 18, 2016, 09:11:17 pm »
Palette is global for entire screen, not only for its parts.
This is a very simple one, with just background picture and some text... but you can already see that if I am taking the palette from the picture, the text will be broken.
In more complicated scenes with dozens or even hundreds of components on the screen (e.g. battlescape) this makes no sense.
I didn't check the cutscenes, but it is possible there only because the whole screen is only one single picture at a time and nothing else.

PS: the palette in the example is also global, not tied to the image... i.e. you need to define it only once... you can see it's a separate element, not within the picture

PS2: can you please remove the quote from your post? quoting several hundreds lines of text and a big picture is really pointless...

For the cutscenes the text color is taken always from the last 16 colors. So if you manage your image pallete correctly text is no problem.

For battlescape it makes of course no sense to take palette from the image. However, Ufopedia images are often just one image with text, so for them it makes a lot of sense.

PS2: Sure

« Last Edit: September 18, 2016, 09:12:51 pm by clownagent »

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Chaingun remodel and palette fail
« Reply #23 on: September 19, 2016, 07:25:59 am »
Yeah, I can change that, but not sure if that's what you want (attached example with color 218 instead of 15).

Yeah that's exactly what I want, thank you :)

For battlescape it makes of course no sense to take palette from the image. However, Ufopedia images are often just one image with text, so for them it makes a lot of sense.

Idk, it'd only serve to aggravate possible infringement problems; also incosistent palettes across the Pedia are likely to look crappy unless a lot of extra care is taken. For me, it's an avenue not worth pursuing, but I might be wrong...
« Last Edit: September 19, 2016, 07:29:07 am by Dioxine »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9093
    • View Profile
Re: Chaingun remodel and palette fail
« Reply #24 on: September 19, 2016, 11:03:46 am »
For the cutscenes the text color is taken always from the last 16 colors. So if you manage your image pallete correctly text is no problem.

Hmm, are you sure?
I see that you can freely define any text color you want for cutscenes text.

In any case, taking the picture palette is also an option, I can add that.

The idea (on my side) is however that we don't have separate palette per each picture, that is not easy to maintain.
I'd rather see several palettes (up to 5-6 maybe), with slight focus on different color.
I like current pictures and their imperfections... it looks better to me... old style, just nice.
However some colors (like red or light blue for example), don't get enough attention.
So I would create some alternate palettes for pictures, which use colors not present in original palette.
One with more red shades, one with more blue shades, etc.
They would all differ from original palette only by 10% let's say, not more... and vanilla/mod-specific colors for should remain untouched (responsibility of the modder of course).

Idk, it'd only serve to aggravate possible infringement problems; also incosistent palettes across the Pedia are likely to look crappy unless a lot of extra care is taken. For me, it's an avenue not worth pursuing, but I might be wrong...

Infringement is still valid no matter how much you bastardize the palette.

The pachyderm example is a bit overexxagerated, I wanted to show the difference. In reality, I would recommend using slightly modified vanilla palette with a few more red shades... as suggested above.

PS: btw. custom palettes (via ruleset) don't need to define all 256 colors. You can define only a few overrides, the rest will be taken from target palette. Just saying if anyone would like to play with that...

A tiny detail: would it be possible to set map background color as well? (right now it's color 15, but undersea would look much better if the now-black areas were actually deep-blue... :)

Should this be a global setting or part of some other configuration, e.g. alien deployment or terrain or ...?
« Last Edit: September 19, 2016, 03:10:11 pm by Meridian »

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Chaingun remodel and palette fail
« Reply #25 on: September 19, 2016, 04:47:10 pm »
Should this be a global setting or part of some other configuration, e.g. alien deployment or terrain or ...?

Terrain - maybe a part of starting conditions? The custom pallette seems to fit into that as well.

Offline clownagent

  • Colonel
  • ****
  • Posts: 380
    • View Profile
Re: Chaingun remodel and palette fail
« Reply #26 on: September 19, 2016, 10:37:29 pm »
Hmm, are you sure?
I see that you can freely define any text color you want for cutscenes text.

In any case, taking the picture palette is also an option, I can add that.

It would be great if you add it.

Recently I made a cutscene for my mod and I found the images looked much better with their own palette.

I think at least the original UFO cutscene images used always the last colors for text.
So I did the same for my cutscene images because I wanted to have always the same text color this was the easiest. Since each image has a different palette it would not make much sense to use another index as text color.   

Offline tormodino

  • Sergeant
  • **
  • Posts: 22
    • View Profile
Re: Chaingun remodel and palette fail
« Reply #27 on: September 21, 2016, 10:26:44 pm »
Great to see that colour is less restricted that it first appeared.

I got the standard palettes to work in game for my flintlock and musket remodel, but for some reason the chaingun needs to be redone completely.

How would I go about submitting art for possible inclusion in the mod? I attached a screenshot of a gal equipped with the latest addition to my personal arsenal :)


Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Chaingun remodel and palette fail
« Reply #28 on: September 22, 2016, 11:04:49 am »
Just post them here :) Fixing your chaingun was just a simple matter of converting it to Indexed color mode. I'm not including it, since it's not that great, but these muskets, they look really good!

Offline tormodino

  • Sergeant
  • **
  • Posts: 22
    • View Profile
Re: Chaingun remodel and palette fail
« Reply #29 on: September 22, 2016, 01:30:19 pm »
Thank you :)

I fully agree that the chaingun was not that good. I'll make a thread where I'll add any models I make as I play, and you can just include those you feel you can use.