A little graphical help....

Ingvar VII

Chieftain
Joined
Jul 11, 2010
Messages
74
Does anyone know how the "transparent" color works?

FreeCiv graphics seem to use this for the background, rather than the pink/violet Civ 2 uses. Paint can't handle this "color" it seems. Anyone know how it works?
 
Check out Catfish's post (#87) in this thread: SL Wiki Upload List. I haven't had the time to install or try out the programs over the past few days, partly because I need to get Vista service pack 1.1 installed before I can run them. Hopefully tomorrow will be pretty quiet and I can sort it out. We can compare notes then.
 
Well, you know three color channels R, G and B. Alpha channel is fourth channel telling how transparent pixel is.
Could probably make quite cool stealth units by setting unit 50% (or something) transparent.

EDIT: Maybe setting unit near 100% transparent near the edges and gradually making it more solid towards center. Don't know about the playability though, don't want the owner to miss the unit. I think I'll experiment if such a thing works in freeciv.
 
Don't know about the playability though, don't want the owner to miss the unit. I think I'll experiment if such a thing works in freeciv.
Semi-transparency certainly works as default tileset seems to draw FoW as semi-transparent black box.
So the experiment would be about playability only. I'd need to learn some new graphics editor skills to make such a semi-transparent unit. That's not a problem, but I also accept ready made gfx if someone here already knows how to do such a thing in a matter of seconds. Nothing fancy, just making some unit semi-transparent. But if it would be bases on some kind of cyborg gfx, I could later use it as "Stealth Spy" in alien ruleset.
 
Sharing this just so others know to avoid same stupid mistake I made (and spend hours figuring out).

I use gimp for gfx editing, don't know if similar problem would arise as easily with some other user interface.

I was taking terrain gfx from civ2 to freeciv.
1) I had to add alpha (transparency) channel. There was two colours used that should actually be fully transparent: pink inside tiles and grey used otherwise. I did "Color to Alpha" for both of these colors.

2) I copy/pasted suitable terrain gfx to new file. Everything looked ok on gimp.

3) I launched freeciv to find out that all terrains from that file were very dark. For hours I tried to figure out why it was being darkened. Even more confusing was the fact that while terrain was dark on map, example tiles shown on editor were very bright.

4) Finally I got sane moment: In editor terrain was being drawn over white background and in map over black one. Turned out all my terrain gfx was semi-transparent so blackness or whiteness of background was showing through.

5) I "Semi-Flatten"ed semi-transparency to suitable greyscale color. There was no visible change in gimp (as it used that color as background anyway) but in game everything was fixed.
 
Top Bottom