PDA

View Full Version : Transparent Colors



Lonemind
01-01-2003, 05:08 AM
I've just begun working with transparent layers and am now trying to change one color into another by applying a transparent layer. Does anyone know a mathmatical formula I might use with the RGB to make a color darker? Straight black doesn't seem to work. It tends to turn bluish green into brown and that not what I'm going for in the least.
To get a better idea of what I'm doing I'll describe it. I have a forest that I want to be VERY dark, but not lightless. In spots the light will be brighter. The center being the brightest and then fading back to the darkness on the outer edges.

Happyman
01-01-2003, 07:07 AM
Try using a very very dark bluish-green.

BTW, how the heck will you to a fading effect?? 2 Trans-layers?

Lonemind
01-01-2003, 02:07 PM
To make the fading effect, from light to dark I have several rings drawn around the central spotlight in only one layer. Each a different color. I was planning on making them progressively darker until they reached the darkest color which would be the majority of the layer. However, I need to figure out a general formula in which to follow so that all the colors look balanced and natural. Right now some of the rings look milky and some are brown. I've figured out that adding too much green to the mix makes it look milky. I'm thinking red turns the colors brown... Seems quite complicated. I think I'd have to take a computer art class or something.

Happyman
01-01-2003, 02:55 PM
Well, I came up with a sorta complicated formula to do it. Now I just gotta test it.

*goes and tests it*

If it works, I'll see if I can help you.

Lonemind
01-01-2003, 03:10 PM
Wonderful. *bows to you* Thank you, Happyman. :D

Cloral
01-01-2003, 04:44 PM
Your problem isn't the color of the layer you are using. Black is the color you would want to use. Your problem is your pallete. Let me explain:

ZC is limited to 256 colors. Thus, when you do transparency effects, what is done is it combines the layer color with what is behind it to come up with an RGB value, and then the nearest palette entry to this color is found and displayed (actually, most of this work is done ahead of time, but conceptually that is what happens). The nearest color might turn out to be not quite what you were expecting if nothing very close to the correct color exists. In your case, the dark brown is the nearest color to the color it calculates for the dark blue-green.

So what you need to do to fix this is to add a few shades of dark bluish-green to your pallete.

Lonemind
01-01-2003, 09:23 PM
Hmm... all right then.
I hadn't even thought about THAT option. Thank you, Cloral.

New Question. Is there a way to have a layer "skip" a color. What I mean is have the layer not change one of the colors in your palette. All I could think of was to draw "holes" in the layer right where the color I want to stay the same might appear. That, however, is tedious considering that this color will be used in small bits all about the screen.

Dark Nation
01-02-2003, 01:21 AM
Um, why would you need to do that? Just use color 0 so it's not drawn at all.

Ganonator
01-02-2003, 03:36 AM
another little trick that is overlooked is redrawing transparency... Zquest looks a BUNCH different than ZC when doing little transparency fixes.. make sure you hit B (its a hotkey, not what you have set as the 'b' button in ZC)... this will correct any little problems that you are facing on the way.. I tried to do this trick using blacks and dark blues, but I could never get the transition down from kinda dark to almost totally dark.. if you get it to work, excellent.

Lonemind
01-02-2003, 11:19 PM
Well, I COULD use color 0. That's what I meant by drawing "holes" in the layer. I'd use color 0 to create the holes right over the spots I want to be unaffected by the layer. As I said, though, that is tedious because the color I want to stay the same is going to be in small spots all over the screen.

Thanks for the tip on the hotkey, ganonator. I knew that the transparency needed to be rebuilt each time you changed the palette but didn't know about the hotkey. I was just switching between a blank screen and my screen with the transparency on it.