Who knows some instruction for transparent texture mapping?
I want to know some instruction for transparent texture mapping. I tried some bland command(glBlendFunc()) but it does not work so good.
For eg., You have two walls: A and B, both are transparent, you draw the A first and B second using glBlendFunc(), and the A is NOT transparent http://www.opengl.org/discussion_boards/ubb/frown.gif

So, I need some REAL transparent command.
Thank you very much

JML

02-25-2002, 11:14 PM

Originally posted by warrener:
Who knows some instruction for transparent texture mapping?
I want to know some instruction for transparent texture mapping. I tried some bland command(glBlendFunc()) but it does not work so good.
For eg., You have two walls: A and B, both are transparent, you draw the A first and B second using glBlendFunc(), and the A is NOT transparent http://www.opengl.org/discussion_boards/ubb/frown.gif

So, I need some REAL transparent command.
Thank you very much

Well, this may not be really an advanced question, but anyways...

In order to correctly display multiple transparent objects with overlap, you should draw them in a depth-sorted order (back to front).
The transparent objects should be drawn AFTER all opaque objects have been drawn unless you can depth-sort these too.

There are techniques that allow correct rendering of transparent objects without performing the depth-sort, but these are harder and may involve using frame-buffers with alpha channels (not always available and not always high-performant).

now you want to know why the color-command affects the objects ?? because each pixel is multiplied with this color-value ! and in this example you apply an alpha value of 0.75f or 0.25f which produces transparency (alpha 1.0f is solid )

pongsak.a

02-26-2002, 03:39 PM

Hope this help you. http://nate.scuzzy.net/gltut/colorkey.zip
Goodluck.