Advertisement

Normal vectors in vertex arrays

Started by February 23, 2003 09:53 AM
0 comments, last by Marty666 22 years ago
Hi I use a vertex array to render a heightmap (triangle strips). Each vertex needs a normal to have my landscape be smooth shaded, right? Can I just take the average of all the normals of al the triangles that are around the vertex? Or should I just take the normal of the last triangle in the strip? Thanx, Marty
_____ /____ /|| | || MtY | ||_____|/Marty
Yes, you would take the average of the normals of the surfaces next to the vertex, (phew...). This would give you nice, smooth lighting. But what I did was to calculate all the normals first and put them into an array.

This topic is closed to new replies.

Advertisement