• Create Account

## Generating Vertex Normals

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

2 replies to this topic

### #1jujumbura  Members

209
Like
0Likes
Like

Posted 16 January 2013 - 05:30 PM

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?

Thank you for any advice!

### #2Paradigm Shifter  Members

5832
Like
0Likes
Like

Posted 16 January 2013 - 06:10 PM

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, 16 January 2013 - 07:04 PM.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

### #3irreversible  Members

2595
Like
0Likes
Like

Posted 16 January 2013 - 06:22 PM

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.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.