aliens

Author Topic: image editors / graphics programs  (Read 117657 times)

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: image editors / graphics programs
« Reply #30 on: April 22, 2015, 05:11:18 pm »
There might be an error in this palette, but yeah, types 1, 3, 7, 8 use Research palette, while types 2, 4, 5, 6 use Battlescape (Tactical) palette minus last 16 colors.

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: image editors / graphics programs
« Reply #31 on: April 22, 2015, 06:01:39 pm »
There might be an error in this palette, but yeah, types 1, 3, 7, 8 use Research palette, while types 2, 4, 5, 6 use Battlescape (Tactical) palette minus last 16 colors.

@Dioxine:
Would you consider maybe working with Robin and reworking this Ufopedia.org page?

https://www.ufopaedia.org/index.php?title=Modding_sprites_(OpenXcom)

Offline Vesparco

  • Sergeant
  • **
  • Posts: 49
    • View Profile
Re: image editors / graphics programs
« Reply #32 on: April 22, 2015, 08:31:03 pm »
Found the issue by comparing with other images of the ufopedia. It seems that the image palette I took from the wiki is somehow "corrupted". By terms of the 63/x3F values the color RGB codes must be multiple of 4 (being maximum 252-255 values). The color palette gives somehow in paint.net numbers that are not multiple (I suppose is the conversion to the png format). Has anyone by chance the same palettes in gif format or any other? (even in RGB code should work).

Edit:

Tried to rebuild the color palette from the one presented in the falco palette fix. Basically I took a picture and read the values, as they all seemed in the correct format (multiples of 4) I tried to recreate the palette using a program that didn't messed up the codes ("pictures to color"). It exports the palette info into an html, which I then edited into sublime 2 and then crafted the paint.NET palette. I attach the file along with a file edited with it in case someone can tell me if the ARGB codes are wrong or the picture generated by it has something weird the final step.

« Last Edit: April 23, 2015, 12:33:44 am by Vesparco »

Offline Vesparco

  • Sergeant
  • **
  • Posts: 49
    • View Profile
Re: image editors / graphics programs
« Reply #33 on: April 23, 2015, 12:35:24 am »
The file palette and the pictures

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: image editors / graphics programs
« Reply #34 on: April 23, 2015, 09:20:01 am »
Nah they don't work at all. It seems like your software is cutting out the "unused" colors from every picture, which ruins everything. Hmm instead of using the files from the internets (I've tried them and these palettes don't seem to be very good), maybe you could try extracting the pallette from working pictures found in some mods? Or - I've modified one of your pictures to fit the research palette, you can try it. Also disable that dithering :) (although with such low-intesity dithering, sometimes a dithered conversion does look better than a smooth one).

@Ivan: nah I couldn't help, I'm an user, not a guru, I don't know a heck about graphic formats, graphic soft (except working knowledge how to use MS paint & photoshop) etc.

Offline Vesparco

  • Sergeant
  • **
  • Posts: 49
    • View Profile
Re: image editors / graphics programs
« Reply #35 on: April 23, 2015, 10:01:49 am »
Nah they don't work at all. It seems like your software is cutting out the "unused" colors from every picture, which ruins everything. Hmm instead of using the files from the internets (I've tried them and these palettes don't seem to be very good), maybe you could try extracting the pallette from working pictures found in some mods? Or - I've modified one of your pictures to fit the research palette, you can try it. Also disable that dithering :) (although with such low-intesity dithering, sometimes a dithered conversion does look better than a smooth one).

@Ivan: nah I couldn't help, I'm an user, not a guru, I don't know a heck about graphic formats, graphic soft (except working knowledge how to use MS paint & photoshop) etc.

Thank you for the picture dioxine, with it I was able to nail de issue. It seems while the color palette between mine are yours are the same (I took several points randomly of the picture), but the codification of the gif file was completely different between one and another. Searching on the net I found that Paint.NET always uses dithering with low quality formats such as 8-bit, it is totally unavoidable. What I did then was to save them again into png format using the range of 24-bit. Now the pictures are more or less visible as in the editor (although I admit that some are seen more ugly than expected XD).

Now that the issue is found maybe paint.NET could be a viable tool to mess pictures around.

In any case thank you very much for the help  :D

Offline Bloax

  • Colonel
  • ****
  • Posts: 322
  • do you want to be any of those things
    • View Profile
Re: image editors / graphics programs
« Reply #36 on: April 23, 2015, 12:15:36 pm »
Could you post the original images here? I have a thing to try out.

Offline Vesparco

  • Sergeant
  • **
  • Posts: 49
    • View Profile
Re: image editors / graphics programs
« Reply #37 on: April 23, 2015, 01:05:26 pm »
Could you post the original images here? I have a thing to try out.

Yes, here they are. I may change the missile by another one which I believe fits better with the tonality. I decrease the quality of some because otherwise are quite huge.

I have still some issues with the palette not being right or paint.net saving the file with the colors he pleases. I have either snap the RGB values from somewhere or keep trying different file saves of PDN  :-\.

I attach also some failed examples   :'(.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: image editors / graphics programs
« Reply #38 on: April 23, 2015, 02:08:00 pm »
Converted them for you:

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: image editors / graphics programs
« Reply #39 on: April 23, 2015, 02:29:31 pm »
When an image converts poorly, it means it relies too much on colors which have no equivalent in XCOM's palette.
It's possible to improve the result by tuning the image's colors beforehand : push the saturation for everything that's not greyscale, and be sure that the largest surfaces use exactly the hue of the available color ranges.

Offline Vesparco

  • Sergeant
  • **
  • Posts: 49
    • View Profile
Re: image editors / graphics programs
« Reply #40 on: April 24, 2015, 12:03:04 pm »
Converted them for you:

Thank you kindly for transforming them. I will gladly use them and bash my head with other topics of the mod (mainly economics and manufacture ???).

When an image converts poorly, it means it relies too much on colors which have no equivalent in XCOM's palette.
It's possible to improve the result by tuning the image's colors beforehand : push the saturation for everything that's not greyscale, and be sure that the largest surfaces use exactly the hue of the available color ranges.

In theory the plugin should truncate all the colors to the nearest equivalent from the palette (the limits of it and if it can happens what you say is beyond my reach). I'll try what you suggest but I will also convert directly the full palette to see if is the PDN or the palette itself. I took the palette both from Falco's plugin and the .act format from Solarius (both gave the same RGB values so I assume they are the correct ones and the program is the one giving the issues).


I'll suggest to the OP to put Paint.NET in the list of not recommended until I find if it is possible to save the pictures in a way that doesn't screw the color code or a way to fix the palette within the program (in case it is that which I doubt).

In the meantime I've been tackling mtpaint (which seems good but I haven't got the skills yet) and graphics gale, which has a free edition and was recommended in a pixel artist web for beginners.


Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: image editors / graphics programs
« Reply #41 on: April 24, 2015, 12:45:27 pm »
I'll suggest to the OP to put Paint.NET in the list of not recommended until I find if it is possible to save the pictures in a way that doesn't screw the color code or a way to fix the palette within the program (in case it is that which I doubt).
Paint.NET is simply not designed to manage the "color indexed" representation of an image. When it loads a GIF, the file is immediately converted to RGB representation. The specific color indices are lost, and colors not used in the image are lost.
In the meantime I've been tackling mtpaint (which seems good but I haven't got the skills yet) and graphics gale, which has a free edition and was recommended in a pixel artist web for beginners.
mtPaint should be fine.
GGale's free version doesn't let you open or save GIFs, it can be annoying. But no problem handling PNG8.

Offline Vesparco

  • Sergeant
  • **
  • Posts: 49
    • View Profile
Re: image editors / graphics programs
« Reply #42 on: April 24, 2015, 02:32:34 pm »
Weird enought I've been trying Graphics gale this morning and seems quite a tool. The issue now is that the png8 that I can save makes the same results as with PDN (I've been working with the research palette). I tried to not save the alpha channel but the color weirdness still persists.

I attach the two missiles I've working on.

Also, out of a sudden fear. Does the aircraft weapons use a different palette ??? ?

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: image editors / graphics programs
« Reply #43 on: April 24, 2015, 03:04:31 pm »
These png files contain images of colors 0 to 22, and a palette of exactly these 23 colors.
It means this program optimizes the image on saving, by scrapping every color which doesn't appear on the image and renumbering the remaining colors.
It may save 699 bytes in the file, but the image becomes unusable in OpenXCOM. If there's no setting in this program to disable palette optimization, --> bad list.


Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: image editors / graphics programs
« Reply #44 on: April 24, 2015, 03:40:20 pm »
Also, out of a sudden fear. Does the aircraft weapons use a different palette ??? ?

As Dioxine Mentioned earlier:
"<Ufopedia entries>.., types 1, 3, 7, 8 use Research palette, while types 2, 4, 5, 6 use Battlescape (Tactical) palette minus last 16 colors."

You can cross reference that with :
https://www.ufopaedia.org/index.php?title=Ruleset_Reference_Nightly_(OpenXcom)#UFOpaedia_Article

To see which types of articles are which.   Craft Armaments are #2 so they would use the Battlescape palette.