transparency, glass problem

Started by
0 comments, last by cherry 20 years, 4 months ago
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.
Advertisement
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.
f@dzhttp://festini.device-zero.de

This topic is closed to new replies.

Advertisement