Definition of Normals

Can anyone provide me with a full definition as to what a normal is, why its so important in 3D Graphics etc? either an explantion or link would be fantastic. Thanks.

Martin.

First, a normal is a vector that is perpendicular to a surface.

It is important because lighting calculations use the surface normal to calculate the intensity of the light at each point on the surface.

In addition to what Jeeeez have said…

When calculating the effect that a light has on a surface, it is needed to know how the surface is oriented. If the surface is facing the light, it will receive more light than if it is sideways. OpenGL will know it from the normal information.

-nemesis-

and another small addition

they are nomalized (meaning having unit length which in most cases and for sure in opengl is 1)

I also understand that opengl defines normals for each vertex. I think these are obtained by averaging the normals of all of the faces that that vertex is a part of.

Originally posted by Julian:
I also understand that opengl defines normals for each vertex. I think these are obtained by averaging the normals of all of the faces that that vertex is a part of.

i am not sure if i got i right, but it sounds like opengl shall be doing this
just to clear it up
opengl only knows vertex normals
meaning you have to specify one normal for each vertex
if you want averaged normals it is your task to do the averaging but you don’t always want averaged normals
think of a simple cube
averaging the normals would give you undesired lighting effects since you want face normals for your cube
therefor you have to specify each corner vertex 3 times so that you can give it 3 different normals dependent on the face you are drawing
so instead of 8 vertices (which are enough for an unlit cube) you have to use 24 vertices for a lit one

More on normals:

The normal is the gradient perpendicular to the line(or in this case face). If on the other hand, the line is a curve. you have to differentiate the equation of the curve to give you the equation of the tangent and from there (using m1.m2=-1) you can derive the equation of the normal. then (if you have co-ordiates, you can find out the gradient by using. if the equation of the line is in the order y=mx+c, m is the gradient. Well, this is how it basically works. but it gets a little more complicated when you add the third dimension. and really, the normal isn’t that important to work out for you, because you dont need to know where to light is coming from. only OpenGL needs to know that, and it works it out for it’s self. So your probably best to ignore all that.

Hav fun, and don’t worry about normals, all you need to know, everyone has already explained to you.

GuruFrog(Phillfrog);