Jump to content
  • Advertisement
Sign in to follow this  
Drew_Benton

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
Quote:
Original post by Drew_Benton
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.

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!