Repairing back-facing triangles without user input
- by LTR
My 3D application works with user-imported 3D models.
Frequently, those models have a few vertices facing into the wrong direction. (For example, there is a 3D roof and a few triangles of that roof are facing inside the building). I want to repair those automatically.
We can make several assumptions about these 3D models: they are completely closed without holes, and the camera is always on the outside.
My idea: Shoot 500 rays from every triangle outwards into all directions. From the back side of the triangle, all rays will hit another part of the model. From the front side, at least one ray will hit nothing.
Is there a better algorithm?
Are there any papers about something like this?