Skip to main content
gamedev.net
🔒 Locked

vertex, normal and surface????

Started by zip7000 Jan 29, 2003 at 3:47 AM 2 replies 400+ views
Original Post
zip7000
zip7000
hi, There is something that I don''t understand about vertex and normal. "Each vertex in a primitive is described by a vector that gives its position, color, texture coordinates, and a normal vector that gives its orientation." So I understand that a vertex is a point with several information, right? A normal is a vector perpendiculary to a surface, right? How is it possible that a vertex, which is not a surface, can have a normal?
Paradigm Shifter
Paradigm Shifter
It''s because we just approximate curved surfaces by triangles. Imagine a sphere represented by a triangle mesh, if you used the face normals for the lighting calculations you would end up with a gem-like appearance. So we average neighbouring face normals to approximate the normal of the tangent plane which would touch each vertex. So each vertex needs it''s own normal for smooth lighting effects.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
zip7000
zip7000
I understand the role of a normal for each vertex. But how can we have a normal of a vertex? it is not a surface. How can we calculate a normal of a vertex?
Paradigm Shifter
Paradigm Shifter
Average the face normals that include the vertex is the usual way to go. Sometimes you only include a face normal in the average if the angles between the normals are over a certain threshhold.
The vertex normal is the tangent planes normal at the vertex position on the surface. (Obviously you can't have a normal to a floating vertex not part of a surface definition)

Vertex normals are ONLY used for lighting. (That's a fib though, they can be used to interpolate the normal for curved surface collision response).

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

[edited by - Paradigm Shifter on January 29, 2003 6:37:49 AM]

[edited by - Paradigm Shifter on January 29, 2003 6:38:28 AM]

[edited by - Paradigm Shifter on January 29, 2003 6:40:02 AM]
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.