Face normals
Hi.
I''m writing my first 3D engine and I really enjoy these pages! Thanks nehe and all other contributers!
But, I have one question:
I import from a 3ds file, but the 3ds format does not contain face normals- is that really correct?
I then try to calculate the normals myself, but what shall I do to make them point in the right direction?
I have my vertex info stored in 3 arrays, with x,y and x like this:
Vertex 1: 0.00 1.00 2.00
Vertex 2: 0.00 1.00 2.00
Vertex 3: 3.00 1.00 7.00
Vertex 4: 2.00 6.00 4.00
Vertex 5: 5.00 6.00 5.00
Vertex 6: 3.00 4.00 6.00
And then face 1 is Vertex 1,2 and 3 and face 2 is vertex 4,5,6 and so on...
I can of course calculate the normal from the 3 coordinates like we learned in math class, but how can I then be sure that the normal points in the right direction? (out from the object - not into the object).
Thanks a lot in advance for your answer.
PS: I try to calculate lightning with face normals first - I''ll may be trying with vertex normals later.
PPS: Sorry about my bad english - I hope you understand.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement