# Generating Vertex Normals

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

## Recommended Posts

Hello all,

I have been making some functions that create "rounded" vertex meshes for me by sweeping over two angles ( vertical and horizontal ) and then using trigonometry to determine x, y and z position values.  The normal for a sphere made this way is simple, but I have started generating more complicated shapes where the normal can't be easily stripped from the position.

So, I am trying to determine the best way to find this normal value.  I know that the normal is given by the reciprocal of the tangent of an equation, and I can find the tangent by taking the derrivative.  But I can I use my original equations for x, y and z in terms of the two angles, or do I need to use different equations?

##### Share on other sites
Quick way is to sum the normals of each face touching a vertex, then renormalise. It usually looks ok. If it doesn't look good you can weight the face normal contribution to the vertex normal based on the area of the face (which is proportional to the magnitude of the cross product of the edge vectors of the face which touch the vertex). Edited by Paradigm Shifter

##### Share on other sites

There a are a number of ways to accomplish this, but what Paradigm Shifter suggested is pretty much the easiest and a relatively stable way to go. For more details have a look at this.

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 9
• 9
• 11
• 11
• 23
• ### Forum Statistics

• Total Topics
633678
• Total Posts
3013291
×