Sign in to follow this  
Jacob Roman

Calculating Normals Per Vertex Problem

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

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