Jump to content
  • Advertisement
Sign in to follow this  
6666662000

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

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 + ... ).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!