Jump to content
XCOMUFO & Xenocide

Xna Winding Order


dteviot

Recommended Posts

OK, I''ve now gotten to the bottom of the Winding order/backface culling.

The rule is, XNA assumes counter-clockwise triangles are backfacing, and culls them.

Unfortunately, due to an error in sample code supplied by MS (which I based Xenocide on) the Geoscape and Base layout assumes clockwise triangles are backfacing.

 

What this means:

  • Geoscape needs to be reworked to correct (clockwise) winding order. This should have no impact on anything else. (Note, RK has already fixed the skybox. I just need to fix the globe and geomarkers.)
  • Base layout will be converted to clockwise winding order. This means the existing dummy facility models will also need to be converted. (This should not be difficult.) It will also mean that any facility we create in the future should have the correct winding order. That is, we won't need to do 180 degree rotations to get them to render correctly.
  • X-Net model viewer currently has backface culling turned off. I'm going to turn on counter-clockwise culling, so that we can easily check that models have the correct winding order. If they show in X-Net, they're good. If they're not, they will need to be fixed.

Any questions?

Link to comment
Share on other sites

×
×
  • Create New...