GIMP alpha problem
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
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.
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.
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
-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
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
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
I don't undestand your problem saving out transparent TGAs with GIMP - here's one I saved just now (Gimp 1.2.3)
stupid.tga
Mark
stupid.tga
Mark
Well that image definatly isnt 32bit. Irfanview says its 24bit. And my Loader also says it 24bit. Hmm, this is strange.
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?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement