# OpenGL OpenGL Terminolgy and Quake 3 HUD

This topic is 4849 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I was wondering what is the effect that the Quake 3 HUD, as seen here, is called for the semi-transparent bluish part of the HUD? Is it alpha, transparency, or translucency? Right now I have my code so I can make a HUD similar to that, I just don't know what functions to look into to make that effect. I have the code that takes my color key out of the HUD, for my case a near black color, (0,0,1 or something like that) and that looks like this:
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );

Now, I just need to figure out what to do to make elements semi-transparent as seen in the example so the HUD does not block *everything*. I've noticed I can't mix effects either, only the last effect is used with the blending as well. Thanks for any help!

##### Share on other sites
Quote:
 alpha, transparency, or translucency

Those are all sort of the same thing. 'Transparent' means it is basically invisible; 'Translucent' would be the area between Opague and Transparent. Alpha is just a means to encode that information.

##### Share on other sites
just add an alpha channel to the texture set the transparent part of the channel to 0.2-0.8 (depending on how visable u want the stuff behind it) and set the metal tubing that surrounds the HUD part alpha to 1.0

##### Share on other sites
btw (concerning another post here as well) forget totally about colorkeys in opengl, there is no need to use them

##### Share on other sites
Ok cool, thanks for that explanation Deyja! Zedzeek, that's what I wanted to do, but I'm not sure how. Would I have to then have two textures for the GUI to be able to set the alpha channel that way? Right now I just have one big image I just draw to the screen, but I guess I need to split it up now? Thanks for the help.

##### Share on other sites
Quote:
 Original post by Drew_BentonOk cool, thanks for that explanation Deyja! Zedzeek, that's what I wanted to do, but I'm not sure how. Would I have to then have two textures for the GUI to be able to set the alpha channel that way? Right now I just have one big image I just draw to the screen, but I guess I need to split it up now? Thanks for the help.

You don't necessarily need to split it up. Depends how you're drawing it. Are you doing it by blitting pixels, or with textured polygons? If it's with polygons, you just need to add an alpha channel to your image in the manner that zedzeek suggested. You'll need something like the GIMP, Paint Shop Pro or Photoshop to do it. I can PM you more detailed instructions for doing it in PSP if you want. You'll also need to save your texture in a file format that can support alpha channels. The Targa TGA format is excellent for this.

1. 1
Rutin
32
2. 2
3. 3
4. 4
5. 5

• 13
• 69
• 11
• 10
• 14
• ### Forum Statistics

• Total Topics
632967
• Total Posts
3009570
• ### Who's Online (See full list)

There are no registered users currently online

×