04-01-2002, 02:12 PM
(Sorry for my poor English) I have a Height map and I have a problem with normals. For every face (triangle) I have to memorize four (normalized) costants (a,b,c,d) that rappresent the plane on which the face lays, I need this to do Collision Detection; before I used to do light assigning to the three vertices of a triangle the same normal (a,b,c) but I didn't like the result cause (using a light-source positioned to infinite) the intensity of the light on a triangle was the same. So I assigned to every vertex a normal calculated as a mean of the normals of the triangles that hold the vertex; the result is ok but I have to create different arrays for the 4 costants for every triangle and for the normals for every vertex (because calculating them during the rendering-scene would decrease the performance). What can I do?