Step by step mini guide on how to use Openra.Utilities on the example of a cameo:
1.) Get the palette of the game, e.g. RA: OpenRa.Utility --extract ra temperat.pal
2.) Get a PNG file with the right palette settings by extracting it from a in-game ship file using the extracted palette setting: e.g. OpenRa.Utility --png ttnkicon.shp temperat.pal, with ttnkicon.shp beeing the cameo for the tesla tank.
3.) Use Photoshop (or any other program that uses the palette formats) to open the newly created ttnkicon.png and save the color table of the picture. This file has been attached as an attachment to this post.
4.) Use Photoshop (or any other program that uses the palette formats) to convert Your png format to 8bit/channel, using the custom palette saved before.
5.) Convert the PNG to SHP using OpenRa.Utility --shp YourPNGfile.png 64 , with 64 beeing the width of the cameo file.
Links of interest:
-- SHP Tools
-- shp -> png -> shp using OpenRA.Utility
-- SHP Tools
-- OPen source SHP Builder
-- OS SHP Builder 3.36 released!
-- Tileset Builder 2
-- Empty (no text) Red Alert and CnC Cameo recources
The full exempt of the chat with Chris on how to convert png to shp with the Openra utilities:
Code: Select all
[21:44] <wuschel> Received args: --shp ghostrecon.png 64
[21:44] <wuschel> results in
[21:44] <wuschel> System.IO.InvalidDataException: Unknown pixelformat
[21:44] <wuschel> with the Utilities.
[21:44] <wuschel> png is 64*48
[21:44] <+chrisf> it needs to be 8bit, and using the correct palette already.
[21:44] <wuschel> Ok.
[21:44] <wuschel> I see.
[21:45] <wuschel> RGB 8bit/channel it is.
[21:45] <+chrisf> if you're using ps, that's `indexed color mode`, and obtain a ps-format RA palette by running --png on some shp
[21:50] <wuschel> Actually 8bit/channel did the trick.
[21:50] <wuschel> I need to check it now.
[21:53] <+chrisf> you're going to be disappointed.
[21:53] == Thor_Away has changed nick to Thorpheus
[21:54] <+chrisf> we don't do any conversion from rgb -> indexed in the utility.
[21:54] <+chrisf> (that's actually an ugly problem, and ps does a better job than we can)
[21:54] <wuschel> Yes. I was.
[21:54] <wuschel> :/
[21:55] <+chrisf> are you using ps?
[21:55] <wuschel> Yes.
[21:55] <+chrisf> ok, there's 2 things you need to do:
[21:55] <wuschel> Now I have a "LSD Infantry" unit.
[21:55] <+chrisf> - obtain the ra palette.
[21:56] <+chrisf> use --png on some existing SHP; open the png in ps; save the color table
[21:56] <+chrisf> the second part is to use that color table:
[21:56] <+chrisf> - open your png; image->mode->indexed; load the color table you saved before
[21:57] <wuschel> I see. However, the png command requires a palette as well.
[21:57] <wuschel> --> --png SHPFILE PALETTE [--transparent] Convert a SHP to a PNG containing all of its frames, optionally setting up transparency
[21:57] <wuschel> and --png someshpfile does not owrk.
[21:57] <wuschel> work.
[21:57] <+chrisf> wuschel: do --extract ra temperat.pal
[21:58] <wuschel> ok
[21:58] <+chrisf> then --png someshpfile temperat.pal
[21:59] <+chrisf> that produces an indexed color png, with the correct palette embedded
[21:59] <+chrisf> the silly indirect method of obtaining the palette is needed because ps can't read westwood .pal
[22:00] <wuschel> I see.
[22:00] <wuschel> Will put that on the wiki
[22:02] <+chrisf> (and i dont want to write a .pal -> .act conversion just for ps's benefit)
[22:03] <+chrisf> the other thing i'll mention is that most unit authors use a custom palette with a magenta remap range
[22:03] <+chrisf> you can find a copy of that on the forum
[22:03] <+chrisf> (it helps the rgb -> indexed conversion to not confuse remap with other yellowish bits)