Friday, October 16, 2009

Order Independent Transparency - What It Fixes

Yesterday I blogged about Order Independent Transparency (OIT). That robot is very shiny, but what does this fix in X-Plane itself? Here are two pictures that show the problem in an X-Plane context.

This is the Cirrus jet in X-Plane 9.22.Pretty, eh? But...look through the right two windows - look at the passenger door on the other side. Note that through the middle window the passenger door is visible. Through the right window, the entire passenger door is gone!This is the same shot from X-Plane 940, where the problem has been corrected.

The bug you see here is incorrect draw order. In X-Plane 922, the right door (which contains the right-most near window) is drawn before the left door - hence its translucent part destroys the door.

Max fixed this by changing the draw order of the model - the new cirrus draws the inside view of both doors before the outside view of either doors; because the geometry is one-sided he can draw the 'inside' first and outside 'second'.

AJ - while clipping via transparency is _not_ intentional, my guess is that you can still do it...because OIT will be an option you must turn on. From my understanding, OIT will consume more hw resources, so fill rate will be faster without it.