Sign in to follow this  
alex_r

Face normals to Vertex normals... How?!

Recommended Posts

AHOY! I have some problems with OGL normals, I made a small script to export models from 3DS, but the 3DS just export the face normals. Now I need to convert the face normals to vertex normals to use the index matrix. The big question is, how can I convert face normals to vertex normals?! Thanks!!!

Share this post


Link to post
Share on other sites
I'm not an OpenGL expert, so I don't know if there is a pre-made function in OpenGL that will generate vertex normals for you. But the generic algorithm to find vertex normals when you have only face normals is to take each vertex, find all the faces that use that vertex, and average those face normals. That will be the normal for that vertex. You'll need to do that for every vertex in your mesh.

Hope that helps,

roger_hq

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