Archived

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

transparency, glass problem

This topic is 5130 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''m trying to render an hourglass shape to look like glass. It is the combination of 2 spheres and 2 cones. When I try to make it transparent so the sand would show, I cannot see the sand. I read in other postings that this is because you need to draw the objects in order; but how would I do that for a cone and sphere? I thought Depth Test took care of that? Also, the overlap of the cone and sphere cause a darker stripe to appear, is there any way to get around that? or is there a better technique such as texture mapping? thanks ahead of time.

Share this post


Link to post
Share on other sites
depth test is exactly your problem and can only decide between drawing or not, it will NOT change any orders or whatever because it simply cant and isnt meant to. all solid stuff has to be drawn first, then all transparent objects, preferably with depthmask disabled. dark stripes at overlap can simply be avoided: dont let it overlap.

Share this post


Link to post
Share on other sites