Advertisement

Select Color as Transparent

Started by February 18, 2002 03:54 AM
4 comments, last by Waldoo 23 years ago
How do you make specific color on texture map as transparent? Edited by - Waldoo on February 18, 2002 5:00:05 AM
It is not ''a specific color''. Unless using indexed color (shudder), you''d use the ''alpha channel''.

Alpha = 1 -> opaque
Alpha = 0.5 -> 50% transparent
Alpha = 0 -> completely transparent

Look it up.

If you''re using indexed color, sorry, I''m afraid I can''t help you.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Advertisement
Yes I know that one but I dont want to transparent other colors on a texture map. There got to be a way to transparent in specific area on texture map.

Waldoo
*psssst* this is the way to do exactly what you want. Think about it before ''knowing'' that its not gonna work.

say you want to make red transparent,

ie:

R = 1
G = 0
B = 0

then you''d make A (alpha) = 0 (transparent)

all other channel combinations (for an example)

R = 0.5
G = 0.1
B = 1.0

you''d make A = 1 (opaque)

Please use some brains & research this for yourself =D
I just found a wonderful source code, it is called "Color Keying" You can download it at http://nate.scuzzy.net/gltut/

Enjoy

Waldoo
Lol.. that code does exactly what we were trying to explain to you.

- l8r

This topic is closed to new replies.

Advertisement