|
|
> The normals are not constrained to be consistent within the mesh.
> However, with a little work, they could be made consistent, at which point
> such a scheme would work. It's just a matter of writing the code...
Okay I thought it's the reason why this obvious test was not actually
used in MegaPOV. But how to make the triangle normals consistent ? I was
thinking about some simple (but slow) method like this:
1) Calculate the geometric center of all the mesh vertices
2) For each triangle
a. calculate its geometric center from its vertices
or even simply choose one of its vertex
b. compare its normal vector to the (triangle center)-(vertices
center) vector.
c. revert the triangle vector if dot product is negative
I'm not a genius in geometry/mathematics at all, but it sounds to
be a reasonnable approach to me... I'm waiting for comments from all you
clever boyz out there ;-)
*** Nicolas Calimet
*** http://pov4grasp.free.fr
Post a reply to this message
|
|