How to make color keying in OpenGL ???

Started by
14 comments, last by Daivuk 21 years, 11 months ago
Hi. I want to make mask. But not with multitexture or with blending mask. I want to do it like in Quake, HL, Medal of Honor. With a coloy key. Take a look on the trees in Medal of Honor. I want to do similar. Thx for your help
Advertisement
OpenGL does not support colorkey, you have either to use blending, or alpha test, or both. In all cases you need an alpha channel with transparency information.

-Lev
But nobody have seen the tree in Medal Of Honor ??
Or in HalfLife ?
With blending I can''t get this effet...
And ALPHA don''t work correctly with fog.
And I want to do a forest. So I need fog. And I don''t want to have to desable it for my trees...
I haven''t seen the trees in MOHAA, so I''m not sure what effect you''re going for. I don''t know why you can''t use blending, though. Put your tree image on a black background, and do blending like glBlendFunc(GL_SRC_ALPHA, GL_ONE).
----------------Amusing quote deleted at request of owner
ok. So if I use Blending, I''ll get smooth edge of my texel. It''s not want I want. I want flat edge. I don''t know how to say that. That a look on every game. avp2, moh, q3, serious sam, it''s not with blending they made it. I think it''s with color key. Can some one HELP ME PLEASE !!!!
I think you guys don''t understand what I want.. :''-(
Probably caused by my poor english.
So go there. I take a screen shot of what I mean :::


http://65.197.157.116/troa/colorkey.jpg
SeriousSam Screen Shot of tree
Ok, I think I have a better understanding. But I believe you''re still going to have to do alpha blending, with an alpha channel specified in your image.

Take a look here:
http://www.cfxweb.net/~delphigl/oldnews/february.htm
Towards the bottom of the page, date of 11.2.2001

Perhaps that demo/tutorial can help you?
----------------Amusing quote deleted at request of owner
thx. I''ll take a look over it
I can download from that page. It''s not working. But I saw somehting interresting.

stencil mask

If anybody know about this, explain to me please.
I already know how to use Stencil buffer, so is stencil mask use it ???

This topic is closed to new replies.

Advertisement