Determing facet winding
We normally use clockwise windings for our facet models. However, we have some models that have a mixture of CW and CCW facets so that the backward facets appear dark when displayed in OpenGL.
I was trying to find a way to determine which facets are backwards so that I can fix them in the models. My first idea was to simply do a cross product of all of the facets and check the direction of the normal. If it is negative then I reverse the facet direction. But then I realized that CW facets on the opposite size of the model will always come back negative, since they actually face away from the user. The only other idea I can come up with to to manually render the model from six sides to determines which facets should point towards the user. But even this could cause problems, like how much resolution do I need and what if a facet is perpendicular.
Before I go too far down this road I was wondering if you have any suggestions. Maybe there is a simple solution that I'm not thinking about.