Calculate Normals for a irregular object

I draw an object with about 150 faces.
and all of them is not regularly facing towards the viewer.

so… if I am going to enable lighting…
I have to set the normals for each face…
Is there any clever ways to get the normals?


But, you make the normals? It’s just yet another description of your object.

You could equally be asking;

  • how do I know where I want to put my verticies?
  • how do I know how to colour my verticies?
  • how do I know how to define texture coordinates?

you KNOW hwo to define them because you know what it is that you want to draw. You know the normals of your vertex presumedly because YOU know evertyhing about that point sample (where it is, what colour it is, how it’s textured, and the surface normal at that point).

Having said that, tho’, the cross product of the two vectors will give you an orthogonal vector.