Jump to content
  • Advertisement
Sign in to follow this  
Kris2456

GIMP alpha problem

This topic is 5055 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

Even tho winGIMP is pretty annoying its stillvery good for images. The problem is,is that i cant seem to figure out how to save 32bit TGA files. Ive tried adding an alpha channel. But no matter what, it still seems to say that the image is 24bit. Does anyone know how to enable this. Also, assuming that i load the 32bit image. How doi make it so that the alpha pixels are removed. Do i use glAlphaFunc, or what? thx

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
google, I had this same problem.

Share this post


Link to post
Share on other sites
Don't know the specifics of 32 bit TGA files, but as far as alpha channels...yes, you can use glAlphaFunc to remove your 0 alpha values. My question is why do you just want to remove pixels, or do you want to blend partially transparent pixels?

If you just wish to remove a single pixel, you can use a regular 24 bit TGA and set a specific color (like 255,0,255) and just check for that when you load the TGA file...then set that alpha to 0.

Share this post


Link to post
Share on other sites
Transparency is usually done like so:

-1) Render all non-transparent objects
0) Put pointer to all objects you want to draw in an array
1) Sort objects from far to near
2) Enable(BLEND)
3) BlendFunc(SRC_ALPHA,ONE_MINUS_SRC_ALPHA)
4) Enable(DEPTH_TEST)
5) DepthMask(FALSE)
6) Draw furthest object first

Share this post


Link to post
Share on other sites
I knew that,, as in, how to sort. But I assume to use the alpha channel from .tga files in OpenGL i have to use (GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);


As for GIMP, does ANYONE know how to save 32bit tga files. Im really getting annoyed cos i want to get my particle system to work.

thx

Share this post


Link to post
Share on other sites
I opened the .tga on my linux box and according to the gimp, it's 32 bit. Didn't your mother ever tell you it's not nice to argue with gimps?

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!