# A question about normal culculation

This topic is 4356 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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.

##### Share on other sites
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.

##### Share on other sites
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.

##### Share on other sites
What would the "weighting" factor be?
It says, the "weighted" average.

##### Share on other sites
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.

##### Share on other sites
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 :)

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 14
• 30
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631782
• Total Posts
3002325
×