[Graphics] We interrupt our irregularly-scheduled program for this bulletin

Submitted By: Buster's Uncle Date: February 29, 2012, 05:31:09 PM Views: 484

We interrupt our irregularly-scheduled program for this bulletin

[Another old how-to, but as always, edited to contain no misinformation, given what I’ve learned since.   I’m still learning how to do this stuff better as I go, too.]

Pickly had a question about changing the background colors in the (faction)2&3.pcx files with GIMP while replacing faction logos. To be honest, I use Photoshop for that because I'm used to the select tools there- so my answer wasn't as helpful as I would have liked. I've done a little testing using the Hive2.pcx now, and here's what I learned.

After loading the .pcx into GIMP, I selected Image>Mode>RGB (a lot of functions aren't available with the .pcx set to Indexed colors, so you have to switch mode to RGB, then put it back to Indexed before you save.) First, I used the square select tool to select the entirely black-and blue part.

Then I used the fuzzy select tool to add blue from the rest of the image to that- it's the fourth tool on the top row of the toolbox, a wand with a round yellow bit on the end. Mine had the threshold setting at 31. When the fuzzy select tool is in use, you can use those red mode buttons at the top of the current tool settings to add or subtract to what you're selecting. It's better to hue-shift everything you're going to change the same way at once when you can, as then you don't have to keep track of as much.

(Note the stuff the red arrows are pointing at. It's stuff you need to find to do this. I didn't find the Add and Subtract buttons right away, myself...)

After some tedious individual pixel selection, zoomed in real close -but fortunately, it's a small image with high contrast, so not TOO tedious, compared to some I've had to do just lately- I ended up with this:

[In retrospect, I should have selected those purple bits against the red to hue-shift with the rest…]  Then, Colors>Hue-Saturation. In the control that popped up I shifted the hue of everything selected -90 (to the left)- I'd arbitrarily decided I was preparing the background for a green logo- your mileage will vary- and got the following, which needed the logo erased. I used the circular select tool

Afterwards, the smudge tool and a lot of nitpicking work zoomed in close is great for cleaning up anything that doesn't look right around the edges.

Here it is at 100%, ready for your green custom logo to be added.

Saving it can be a bit of a problem in GIMP; this particular one should save fine as-is, but doing anything to the purple background in the main faction .pcx or [faction]3.pcx renders said background non-transparent.  One way around this is to add a transparent layer, use the Select by Color Tool (with the Threshold set to 0) to select all the background shade, delete it, and then select the entire pic and paste into a blanked-out copy of the .pcx, then save that.  It should already have the right palette, and you only have to Save As to change the filename to what you want.

In cases where the background transparency color is untouched, a simpler way is create a GIMP AC palette; open palette.pcx from your SMAC(X) root directory.  Windows>Dockable Dialogues>Palettes.  Right-click on the background of the Palette box>Import Palette.  Check the Image option at the top>Import.  You should now have a palette called something like palette.pcx at or near the top of the Palette box.  This probably sounds harder, but unlike the transparent background copy/paste dodge, you only have to do it once.

Whenever you save a faction .pcx, first Image>Mode>Indexed and in the Indexed Color Conversion pop-up, click Use custom palette, uncheck Remove unused colors from color map, and click on the colorbox under Use custom palette to load your palette file.  Hit Convert, then save the .pcx as you normally would.

I’ll go into this GIMP palette issue and the workarounds in more detail in future tutorials.

Rating: ***** by 1 members.


* User

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
18 (6%)
XP Compatibility patch
9 (3%)
Gog version for Windows
77 (29%)
Scient (unofficial) patch
28 (10%)
Kyrub's latest patch
14 (5%)
Yitzi's latest patch
85 (32%)
AC for Mac
2 (0%)
AC for Linux
5 (1%)
Gog version for Mac
10 (3%)
No patch
12 (4%)
Total Members Voted: 260
AC2 Wiki Logo

* Random quote

The chief aim of their constitution and government is that, whenever public needs permit, all citizens should be free, so far as possible, to withdraw their time and energy from the service of the body, and devote themselves to the freedom and culture of the mind. For that, they think, is the real happiness of life.
~Sir Thomas More ’Utopia’, Datalinks

* Select your theme