Author Topic:   Transparent polygons
posted November 16, 1999 12:58 PM            
Im about to implement transparency in my engine, and Id like to know from anyone who already did this. I know I have to sort the polygons from back to forth, but what is the best way to determine which polygon is farther:
- the farthest z coordinate
- the nearest z coordinate
- averaging the three z coordinates



LDA Seumas
posted November 23, 1999 03:27 AM           
I think it boils down to whatever works best for you. The "correct" way to do it is to split polygons in two if they intersect each other and then sort the fragments, but that's only applicable if you have intersecting transparent polygons and want a perfectly correct solution. Another consideration is that Additive transparency is order independent, so you don't need to sort.

Tread Marks doesn't sort at the polygon level within meshes. Billboarded sprites are sorted by distance, and transparent meshes are sorted by distance as well, but since almost all transparent meshes are Additive, the polygons within the meshes don't need to be sorted. (For the few transparent meshes that are not additive, e.g. blown off tank turrets, I simply ignore the minor and hard to see drawing errors.)

-- Seumas McNally, Lead Programmer, Longbow Digital Arts