Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

edwinnie

alpha blending & transparency issues...

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

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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!