Archived

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

Normal question

This topic is 5648 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Once I got the normal, what do I do with it? Because I only have one normal and a triangle has 3 vertices which holds 3 normals. Right now I''m using the same normal for the 3 vertices, if this works then I''ll be wasting ((sizeof(float)*amount_of_coords)*(amount_of_vertices-1)) bytes of data.

Share this post


Link to post
Share on other sites
Using the same normal for the three vertices of a triangle is good for flat shading.

If you want to use either gouraud or phong shading you will have to smooth your normals. To smooth the normal of a vertex you need to average the normals of the faces which use this vertex (you may also set a maximum angle between the different face to be smoothed, otherwise it won''t work for a cube for instance).

Share this post


Link to post
Share on other sites