Transparent teapot

A demo showing how to deal with transparency on a single model. (There are further issues with multiple objects but that is beyond the scope of the demo.)

With the keyboard, you can select four different drawing modes:

1: No backface culling, no Z buffer (fairly decent)

2: No backface culling, Z buffer on (visible artifacts)

3: Culling and Z buffer (back-side disappears completely)

4: Cull front and back to draw each separately (best result)

This is a surface model, so there is no (simple) way that we can get full volumetric effects. The ambition level is rather to make the best of simple surface rendering solutions, and then the best result is to render both back and front sides, properly blended. (Advanced solutions could include refraction effects or converting the model to a 3D voxel array, but that is a lot more complex.)

Updated 2017. Updated again 2022.



This page is maintained by Ingemar Ragnemalm.