Archived

This topic is now archived and is closed to further replies.

arunvb

Question regarding normals...

Recommended Posts

This sounds kind of silly, but I suddenly got this fundamental dounbt. What is the difference between a face normal and a vertex normal ? Isnt the vertex normal a bisector of the all the face normals of the faces converging at the particular vertex ? I got this doubt because I read in a book that a single vertex ( one the 6 vertices ) of a cube will have 3 vertex normals, pointing towards each of the faces which converge at that vertex. Thanks in advance for clarifying. Arun

Share this post


Link to post
Share on other sites
Basically the face normals are most useful for flat shading. This is obviously what you want for a cube, as each face needs to be lit like it were flat. Now, problems arise when you start getting into spheres and such. Suddenly you''re trying to make it seem that there are more vertices that have *very* small flat surfaces when you may only have a few surfaces. The way to fix this is to average the normals of each face where it converges with another face, thus getting vertex normals. This allows for gouraud and phong shading, since then you can interpolate across the entire surface and find the correct light normal for any point rendered in the final triangle. This is where you start to see the smooth light shading and such. Hope that helps.

Pythius

Share this post


Link to post
Share on other sites
I just realized that I wasn''t all that clear there. Does it make sense? Let me try one more time, for my sake.

Face normals are different than vertex normals. A face normal is a light normal that is meant to be applied over an entire face, rather than applied to multiple faces that that vertex happens to be a part of. Since a cube has sharp corners, and each face of the cube must be differentiated by lighting, we find that it''s best to use face normals. Since a cube can be composed of 8 vertices, each vertex being shared by three faces, we encounter a problem. Suddenly we need to account for the three different faces that each vertex is a part of. Since we apply light based upon the vertices, and each vertex is part of three faces, we have to store three normals per vertex.

Now, as for the vertex normals. This is most useful for an object without smooth edges, like a sphere. In a sphere, you can still use a set of common vertices for multiple faces, but each vertex should have its own normal to make the lighting smooth. Otherwise, you''ll get a sphere that looks like it''s made out of triangles (which it is). Granted, the more faces you give it the better it will look, but it''s much better to simply set the normals for each vertex (and not face). To do this in a sphere, construct a ray from the center of the sphere to the vertex, and there you go. If used properly, this will give you smooth light shading which gives the illusion of an actual sphere, at a much lower poly count.

Now that I''ve read that a few times, I''m satisfied with the phrasing. Good luck in your quest.

Pythius

Share this post


Link to post
Share on other sites