Jump to content
  • Advertisement
Sign in to follow this  
rajesh_nest

Alpha Blending when Front face becoming back face

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

To begin with I have one basic question.

How can we interpret, the rotation of an object. Can we say that our camera has moved to back of the object so that the front face is now back of the camera and vice versa.

Now my actual problem is to implement alpha blending on a scene(consists of two overlapping squares, alpha value of the square in the back is opaque, I have disabled the depth buffer). My implementation is working fine.
But When I rotate the scene, no alpha blending is occurring.

Now my question, is it possible to implement the alpha blending even when I am bringing the back face to front.

Share this post


Link to post
Share on other sites
Advertisement
I'm not sure i understand your question , you might need to clarify this or you'll not receive much feedback. With what kind of scene are you dealing with? What kind of objects? Convex? Polygon soup?

Post some screenshots, please (:!

Share this post


Link to post
Share on other sites
My scene consists of a tetrahedron.

I got the idea. I am going to try depth peeling for alpha blending and see whether it works for the tetrahedron.

Are there any issues in using depth peeling?

Share this post


Link to post
Share on other sites
If you're doing (partially) transparent polygons, you'll need to draw them last, after all your solid geometry.

The reason is that the alpha-blended polygons do write to the depth buffer, so if you first draw a pane of glass, and then something behind the glass, the graphics card will decide that it doesn't need to be drawn, and it won't show up! Read up on Z-buffering if this doesn't make sense to you.

So, bottom line: draw transparent geometry last.

Share this post


Link to post
Share on other sites
Quote:
Original post by thomastc
If you're doing (partially) transparent polygons, you'll need to draw them last, after all your solid geometry.

The reason is that the alpha-blended polygons do write to the depth buffer, so
So, bottom line: draw transparent geometry last.



I have already done this. But my problem is, when I rotate the tetrahedron, aplha blending is not happening.

So I am attempting Depth Peeling technique, hoping that it will generate exact transparency.

Sorry, I cannot share the snapshots, since my work is confidential in nature.

Share this post


Link to post
Share on other sites
Quote:
Original post by thomastc
So, bottom line: draw transparent geometry last.
Also, sort your transparent geometry from furthest to closest.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!