I’m pondering how to create good normals for any given triangulated mesh. The standard approach “just average all face normals that meet at a vertex” just doesn’t cut it.
One common answer to this is “don’t average normals of faces that meet at a sharp edge”. Well, I want to compute vertex normals. One vertex can be shared by many faces, even ones that don’t share an edge. So the edge-answer seems wrong to me.
I’m now doing:
1. weld the mesh 2. compute per-triangle face normals 2. for each vertex build a list of triangles that index the vertex 3. for each vertex V's triangle-list for each triangle T1 in the list find all others T2 in the list if ((T1 dot T2)<creaseAngle) remember in T1 and T2 that they are allowed to be averaged at V 4. finally, average the normals that are allowed to be averaged 5. distribute the averaged normals to the faces they belong to
This works well for sharp features but unfortunately, there are cases where it just fails
Is there some well known algorithm that handles all (most) cases?
I have been searching the web, but did’t find anything useful.