Jump to content
  • Advertisement
Sign in to follow this  
sunrisefe

render transparent and opaqueobject

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

I want to render tree with leaf and branch, leaves are transparent triangles and branches are opaque. In the tree's mesh, leaves belong to attributeSet 1 while branches belong to attributeSet 2. How to render the tree correctly? I render it in the order: first render all branches then render all leaves with no sorting,but there generated picture is not right.

Share this post


Link to post
Share on other sites
Advertisement
This is the wrong forum for technical questions - but you would generally draw opaque parts first (drawing near triangles first, but this is not hugely important).

You would then draw the translucent polygons from far to near (to ensure correct rendering)

Share this post


Link to post
Share on other sites
Quote:
but there generated picture is not right.

That's the thing you should expect when you work with realtime computer graphics. Always something won't look right. But you will usually have 2 choices - leave it or fix it, the second choice takes a lot of time (both to implement and to execute the fixed drawing code) to do so you will mostly use the first one.

Share this post


Link to post
Share on other sites
Quote:
Original post by WavyVirus
you would generally draw opaque parts first (drawing near triangles first, but this is not hugely important).

You would then draw the translucent polygons from far to near (to ensure correct rendering)

draw the translucent polygons from far to near, DX supply sort function or do it myself?

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!