Sign in to follow this  

Calculating Normals Per Vertex Problem

This topic is 4400 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

What's the correct way to calculate surface normals per vertex? No matter what I try, my polygons still appear flat shaded, even when gouraud shading or phong shading is enabled. It only appears smooth shaded when I load a mesh from a file. So I know my math is wrong. Anyone know the correct way to calculate them?

Share this post


Link to post
Share on other sites
The most simple method is to add the normals of all the faces that share the vertex and normalize the result. Another method is to use a weighted sum of the face normals.

There's an article on GameDev.net, titled "Normal computation for heightfields" or something similar, by J. Walsh, and it covers the 2 methods briefly (though in the context of heightfields).

Share this post


Link to post
Share on other sites

This topic is 4400 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this