Transistor Tech Icons

HorseSoldier

Retrofit this....
Joined
Jan 11, 2004
Messages
79
Location
Wrigleyville North
View attachment 383391Transistor symbol drawn on Portuguese pavement in the University of Aveiro

From the Wikipedia article - pretty cool :cool:

 

Attachments

  • Transistor-lg.pcx
    28.9 KB · Views: 541
  • Transistor-sm.pcx
    2.7 KB · Views: 204
Just as hint: the last two colors of the palette are the transparency colors. Converting an non indexed image to a palette with 254 colors and adding the last two colors manually will prevent further problems.
 
What problems ?

Just took a quick look and noticed that your pcx files are not indexed correctly. CivIII reads the colors in index positions 254 & 255 in the color table as transparent colors. If those colors are in the final indexed pcx they will appear transparent in-game.

So you want the colors in those two index positions to not be used anywhere in the image. Generally, the colors used in these two positions would be either pink 'ff00ff' or lime green '00ff00' or one of each since they would almost never be used in an image.

Just an example I had:



Depending on the graphics program you use, index positions 254 & 255 will either be at the end of the color table or like in the image above at the beginning.

On a related note, it's also a good idea to make the small pcx from the original image rather than making it by reducing the large pcx to the 32x32 dimension.
 
Thanks for the tutorial - this I will do from now on....

But when I uploaded the PCX's - I downloaded them from the post to see how they looked and didn't notice anything wrong.. What did you see? And how did you know I shrunk the SM from the LG ? (I did :eek:)

Thanks again for the input.....
BTW - I use PSP 9 - $10.00 @ e-bay

After some time in PSP - this is not working...... Regardless of which end of the color palette (beginning or end) I choose - the selected colors are in the image - and changing the RGB values changes the image significantly. Doesn't matter which format - .pcx, .jpg, .bmp....

If the picture I end up with looks fine in the game without adjusting the palette as above I can live with it. If not I assume I'll have to mess with the color table after spending some OJT... Ugh
 
I downloaded them from the post to see how they looked and didn't notice anything wrong.. What did you see?



Notice all the pink pixels in the image. The game is reading those colors in index slots 254 & 255 as transparent so they show through.

And how did you know I shrunk the SM from the LG ? (I did :eek:)

The pcx image looked blurry. When you reduce a 16.7mil image (RGB) to 128x128 the graphics program is going to extrapolate the colors in the image to approximate the look of the original picture. By reducing it further to 32x32 you get an extrapolation of the extrapolation, which makes it look even less like the original image. If the LG pcx has been indexed already when it's reduced to the SM pcx size the distortions are even worse since you only had 256 colors to work with.

After some time in PSP - this is not working...... Regardless of which end of the color palette (beginning or end) I choose - the selected colors are in the image - and changing the RGB values changes the image significantly. Doesn't matter which format - .pcx, .jpg, .bmp....

There's a couple ways to do this. Probably the easiest is when you index the image don't do 256 colors, instead choose 254 and then manually enter the last two colors. I think Kyriakos did a tutorial on this somewhere in the Tutorials section with images if I remember correctly. He might have been using GIMP though, but the principle's the same.

Just remember that the colors in index slots 254 & 255 (Index numbers start at 0) should not be anywhere in the image, that's why we use pink and lime green. I don't know in PSP where those slots are - at the end or beginning of the color table - so you'll need to check. I think in GIMP they're at the end and in PS, which I use, they're at the beginning.
 
Thanks for the very lucid help. Have replaced attachments in post #1 with fixed versions (different file names -was LG- is lg, was SM- is sm). When I first saw the picture in the Wikipedia article - it was a no brainer that it HAD to be made into a tech icon for Civ3 due to its......
je nais se quoi.....

Glad to see your using it - the transistor, arguably, was one of the most important tech advances in our history...

Now if I can just figure out how to specify a 254 color palette in PSP.

Thanks again for the schoolin'

Edit: I put it it the Downloads Database but couldn't figure out how to do a preview pic. D'oh ! ...little help ?
 
Something still doesn't seem right with the pcx's. I had some time tonight so I found a HQ image of your picture and made some quick pcx files. Compare the large pcx images below:



and the associated color tables (keep in mind this is Photoshop so the color tables are reversed):



The first images are your updated pcx file/color table and the second images are the ones I whipped up tonight. The color indexing appears fine, but it looks like when you resized the image to the correct dimensions the image resampling method you used didn't provide smooth gradients so the image appears blocky/grainy. Or maybe the resolution of the original picture wasn't good to start with.

It also limited the colors in the indexed image from 254 to 250. Notice that you have four index slots all in black (Indexes 250~253), which are basically 'blank' since black isn't used in the image.

Sorry, I feel like I hijacked your thread. In any event I'll attach the two pcx files I did if you want to look at them.
 

Attachments

  • Transistor-Large.pcx
    20.2 KB · Views: 205
  • Transistor-Small.pcx
    2.1 KB · Views: 200
You haven't hijacked anything - this is great "how to" info that is surely benefitting me and, I hope, other browsers of this thread.........

I've noticed the same graininess in other pics I've done also (and from other sources). The Res on my originals is usually very good. I reduce the images after I reduce the colors to 8/256 - Maybe I should reduce the size first. I also set the resolution to 300 pixels/inch during the resize - could this be a culprit ?
 
I reduce the images after I reduce the colors to 8/256 - Maybe I should reduce the size first. I also set the resolution to 300 pixels/inch during the resize - could this be a culprit ?

Yep, that would be a problem. Resizing an image after it's been indexed severely limits the available colors when the image is resampled. My suggestion:

  1. Take your image and make sure the dimensions are equal along the axes, crop off excess.
  2. Save image as a bmp.
  3. Scale image to 128x128.
  4. Index image to 256 with indexes 254 & 255 transparent colors and save as pcx.
  5. Take saved bmp from #2 and scale to 32x32.
  6. Index the image same as before.

300 px/in is not necessary and can make an indexed image look worse. 72 px/in is what I normally use.
 
Index image to 256 with indexes 254 & 255 transparent colors and save as pcx

Again - this is giving me fits as PSP will only let me coose one pixel as transparent and is irrelevant anyway as the 256 palette table PSP generates has colors in the 0 & 1 and the 254 & 255 positions that are always used in the image - regardless of the three options it gives (palette order, luminance, or hue).
If I overwrite the RGB values to 0, 255, 0 and 255, 0, 255 respectively in 0&1 or 254&255 - it changes the image (usually drastically). I can't find any options to specify any other parameters............ - pretty frustrating - at least PSP only cost me $10 :rolleyes:

I will admit - I am very much a noob dealing with PSP. I'm not (now or ever) any kind of artist/graphics person (I never could color inside the lines as a kid :()and am learning from the bottom up.
 
Again - this is giving me fits as PSP will only let me coose one pixel as transparent and is irrelevant anyway as the 256 palette table PSP generates has colors in the 0 & 1 and the 254 & 255 positions that are always used in the image - regardless of the three options it gives (palette order, luminance, or hue).
If I overwrite the RGB values to 0, 255, 0 and 255, 0, 255 respectively in 0&1 or 254&255 - it changes the image (usually drastically). I can't find any options to specify any other parameters............

I fired up my unused copy of PSP X6 and took a quick look at how to index a pcx file correctly for CivIII.

  1. Once you have your square base image resize it to 128x128px (or 32x32px).
  2. Next index the image by selecting image > decrease color depth > x colors (4/8 bit) and under palette select 254 colors. Adjust options and reduction method to your liking (trial and error here).
  3. Now select image > edit palette and the color table will pop up. The last two colors in indexes 254 & 255 will be black. Double-click on 254 and change the HTML code to 00ff00 and then double-click on 255 and change it to ff00ff.
  4. Finally, select file > save as > file name.pcx.

As a side note, you might consider downloading GIMP and using that program instead of PSP if you're just planning on doing simple graphics. It's a free program and imho it's easier to use for beginners. Additionally, I think more people here on the CivIII forums use it rather than other programs so there might be more help available.
 
Next index the image by selecting image > decrease color depth > x colors (4/8 bit) and under palette select 254 colors.

Eureka :) - this is the step I wasn't aware of (never really thought of actually as "x" colors didn't really stand out to me as a choice). Thanks so much....
The online help for PSP is pretty comprehensive and will take a couple of days of concerted study - but it must be done if I'm not going to waste space on this forum in the future :blush:

Thanks again for your patient tuteledge and, again, I hope others will benefit. :goodjob:

Better icons for all...........
 
Top Bottom