Trasparent Mesh Object???

Started by
1 comment, last by LeLe 22 years, 5 months ago
I want to render a mesh object to be semi-transparent, but not to use the texture, only use the default Gouraud shading with light. To have the semi-transparent result, the mesh material is set to be transparent. So the back face and the front face shoud be blended if I turn off z-buffer. But I find it is wrong because the back face is black( the normals of vertices at back face are pointed away from the camera, so the shading result would be black). Then I try another method, first to render the back face with the reversed normals that are pointed inside by the CULL_CW state e.g, followed to render the front face with the outside normals by the CULL_CCW state. The render result will be ok for the transparent. But to be convenience, I should have two same mesh objects, one is inside normal, another is outside. It is bad. Can anybody give me advice how to render the whole mesh to be semi-transparent. Thank you!
Advertisement
do you mean something like...

glDisable(GL_CULL_FACE);

render object...

glEnable(GL_CULL_FACE);
i usually turn off depth culling and z test , altohugh it works very well for a single object i didn''t test it yet with multiple overlapping objects .....

This topic is closed to new replies.

Advertisement