View Full Version : Help with normals in Triangle Strips
03-15-2005, 06:13 PM
I have a surface that is laid out as 100 x 100 points, wrapping around in both spherical dimensions. I am computing the face normals for the 6 triangles surrounding each point, and then averaging the 6 face normals to arrive at a vertex normal. The normals work about 50% of the time, and I get banding the other 50% percent of the time. Here is the code. Do you see what I am doing wrong?
03-16-2005, 11:19 PM
I have not taken a closer look at the code, but a few things to look out for is that the winding order is the same for all triangles, if some of them has reversed winding order the normals get messed up for you.
A nice way to check that out is to show back facing triangles, use two sided lighting and make the "back" color different from the "front" color, that way so have a visual indication that your triangles are facing the right way.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.