pontifikas 123 Report post Posted August 19, 2006 I follow the instructions of an algorithm in order to perform some alterations in a 3D mesh. The algorithm requires that I compute the normal vectors as: "The weighed average ("by the AREA of triangles") of the normals to the triangles in the 1-ring neighbourhood of the vertex". I cannot figure out what the above means. The terms "by the AREA of triangles" and "1-ring neighbourhood" totaly confuse me. I know, one way to compute vertex normals is to compute the sum of the normals of the facets which contain the vertex and then normalize the result. Perhaps maybe apply some weights for better results. But this doesnt sound the same with the above. 0 Share this post Link to post Share on other sites
Limitz 342 Report post Posted August 19, 2006 The first ring of triangles of a vertex will just be the set of triangles that have the specified vertex as one of its vertices. So you'd calculate the normals of all triangles that the vertex is in and use the weighed average as the vertex normal, to get a smooth result.Now the weighed average by the area of the triangles means that the greater the area of the triangle the more its normal count in the result. So you should calculate the area of the triangle and multiply the normal by this value. In the end you'd divide the result by the total area of all trhe triangles, but since you normalize it any way this will be redundant.Greetings. 0 Share this post Link to post Share on other sites
jyk 2094 Report post Posted August 19, 2006 Haven't encountered the term '1-ring neighborhood' before, but google seems to indicate that it's simply the triangles that include the vertex in question. As for weighting by surface area, a fairly straightforward way to do so is simply to leave the normals of the triangles un-normalized; they will then be proportional to the areas of the triangles, and triangles with larger areas will be favored when averaging. 0 Share this post Link to post Share on other sites
pontifikas 123 Report post Posted August 19, 2006 What would the "weighting" factor be?It says, the "weighted" average. 0 Share this post Link to post Share on other sites
jyk 2094 Report post Posted August 19, 2006 Quote:Original post by pontifikasWhat would the "weighting" factor be?It says, the "weighted" average.With the 'un-normalized normals' method, the weight is simply the length of the normal. Just compute the triangle normals using the cross product (don't normalize!), then sum the normals of the triangles in the '1-ring neighborhood' for each vertex, and normalize the result. 0 Share this post Link to post Share on other sites
Limitz 342 Report post Posted August 19, 2006 Quote:Original post by pontifikasWhat would the "weighting" factor be?It says, the "weighted" average.Well the area of the triangle which normal you calculate:if you got a,b,c in vertices, .5*|det(a-b, c-b)| = .5 * |((a-b) x (c-b))| should give you the area (correct me if i am wrong)Greetings.EDIT: @jyk: that's even better, otherwise you would be doing the same calculation twice :) 0 Share this post Link to post Share on other sites