alpha blending & transparency issues...

Started by
4 comments, last by edwinnie 20 years, 10 months ago
ok! i got some qns on alpha blending and how it might relate to the design of the scenegraph... 1) if an object has a texture that has an alpha value, do u consider this object as transparent or opaque? 2) if an object has no texture but has a diffuse alpha value of less than 250, do u consider this obj as transparent? 3) does the term transparent here mean zero alpha or alpha < 250? thx! edwinz [edited by - edwinnie on June 18, 2003 11:01:30 PM]
Advertisement
Your questions are like asking if the glass is half-full or half-empty! A texture stores an alpha value that determines how pixels that use this texture get blended with pixels already in the frame buffer. It determines how opaque (not see-through) or transparent (see-through) the material is. A fully opaque (solid) texture or object (doesn''t matter which you''re talking about as they will have the same effect) has an alpha of 255, whereas a fully seethrough texture or object has an alpha of 0.

Those are the facts!

Hope this clarifies things for you...

DChavez.
Actually the effect of the alpha channel of a texture depends on your combiner/texture stage setup + blending modes. Here are a few examples of what texture alpha can be used for:
1) Translucency/Transparency
2) Specular map (gloss map), determines how much specularity shows through each texel
3) Blend for 2 textures for multitexturing (texA.rgb * texA.a + texB.rgb*(1-texA.a))

There are many other uses as well. So you need to use your shader settings to determine translucency/transparency not texture color bits.
Regardless of the precise definitions of "transparent" and "opaque"... If you can see through a poly, you have to treat it as "transparent". If you can''t see through it, then you can treat it as "opaque".

I notice that some people also use the word "translucent" to mean "semi-transparent". I don''t think that is a good idea.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
ok! thx alot!

kudos!
edwinz
Actually transparency and traslucency can be treated differently. With alphatested surfaces (transparency) you do not have to sort for correct rendering. However with translucent surfaces (partially see through) you do need to sort from back to front for proper rendering. Personally I treat transparency and opaque surfaces the same (except for shader setups of course) and render translucent surfaces last (with sorting of course).

This topic is closed to new replies.

Advertisement