Sign in to follow this  

GIMP alpha problem

This topic is 4838 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
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
Lol, yes, sorry.
Basicly, I found out what i was doing wrong. When i saved the file,it say it was 32bit, but it always saved with RLE.To get rid of it i opened it in IrfanView.Which basicly mucks up .TGA's. Thanks for the help guys (and girls,if any).

->SOLVED<-

Share this post


Link to post
Share on other sites

This topic is 4838 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this