Skip to main content
GameDev.net gamedev.net
🔒 Locked

Calculating face normals

Started by BlackDragon777 Sep 12, 2006 at 2:01 PM 2 replies 850+ views
Original Post
BlackDragon777
BlackDragon777
Hi. I have searched google using many different keywords and I have breifly searched this forum for info on this topic. I mostly just pull up information on calculating vertex normals which is what I ultimately want to do in order to do phong lighting. However in order to do vertex normals, I have to first do face normals. I have create a flat 3d triangle by manually inputing the cooridinates for the object space of that triangle. How do I go about calculating the face normal for that triangle? If you would rather direct me to a link, please feel free to but again I need to know how to calculate a face normal. Thanks in advance! GOD Bless you Always!!!!!
BornToCode
BornToCode
Each Face is consist of 3 vertices. So in order to find the face normal
you need to take the dot product of the two outer vectors of that face. for example if the triangle Vertices are Name ABC. then you can simply do so to find the normal of that face.

AB=B-A;
AC=C-A;
N=normalize(AB cross AC);

Topic Locked

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

Sign in to reply to this topic.