How to compute point's normal which shared in 23 triangle?

Started by
5 comments, last by JohnBolton 18 years, 4 months ago
one triangle's normal easy to compute.but How to compute point's normal which shared in 2~3 triangle?
Advertisement
One way to compute the normal is to compute the face normal of each of the triangles that share the vertex and use the average of them.
what does "average" mean?
(normal1 + normal2 + normal3)/3?
Quote:Original post by 6666662000
what does "average" mean?
(normal1 + normal2 + normal3)/3?

Yes. Make sure the three normals are normalized first, though. This is how vertex normals are [usually?] generated.
Quote:Original post by Mercury
Quote:Original post by 6666662000
what does "average" mean?
(normal1 + normal2 + normal3)/3?

Yes. Make sure the three normals are normalized first, though. This is how vertex normals are [usually?] generated.

also it's more important to make sure that normals is normanized after computing the average.
Btw, if you do not normalize first (and just use cross product), your normals will be weighted by surface area of triangle (so larger triangle will influence the normal more) and it could be desirable in many applications.
thank you all!
There is no need to divide by the number of vectors, as the final normalize step will do that automatically. Just do this: normalize( n1 + n2 + n3 + ... ).
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!

This topic is closed to new replies.

Advertisement