Hi all!

I'm looking for advice on how to acheive a particular rendering technique with OpenGL. This is best illustrated by the first The Sims game.

In The Sims, the people themselves were rendered as polygon models whereas all the furniture used pre-rendered sprites. However, the 3d models still intersected the sprites as if they had volume in 3d space. Here the sims pop through the water of the hot tub even though it is a 2d sprite:

Click image for larger version. 

Name:	zbuffer-explain2.jpg 
Views:	172 
Size:	20.4 KB 
ID:	1355

And here the fire (which is a textured cylinder) intersects the 2d sprite of the cooker:

Click image for larger version. 

Name:	zbuffer-explain3.jpg 
Views:	124 
Size:	21.0 KB 
ID:	1356

Each furniture sprite in The Sims had an accompanying image containing the depth of each pixel; something like this:

Click image for larger version. 

Name:	zbuffer-explain.jpg 
Views:	128 
Size:	7.3 KB 
ID:	1354

I'd like to know whether it's possible to this with OpenGL, perhaps by drawing to the depth buffer somehow. I'm having trouble searching for information on this technique, mainly because I don't even know what it's called! I suppose it's a kind of voxel rendering, but this term has many different meanings in different contexts.

Thanks in advance!