PDA

View Full Version : which is best and how to specify



06-20-2003, 02:19 AM
Hi
My model is something like this. a series of rectangular duct sections(kind of a rectangular tunnel)->constructed by drawing the four rectangles on the sides(fixed length)

My problem is specifying the normals for lighting

Which is better? face normals or vertex normals?

at present
I specified normals from the centre of the duct parallel(actually if you take a slice of rectangular duct the normals are perpendicular to the slice) to camera view(glLookAt - looking and moving into the hollow duct) - lighting is not good and no shining effect

normal calculation
calculated vector using centre point of first duct section(section length is small) and the centre point of the next section and normalised it(camera moves through these centre points in the duct)

Now how should i specify the normals to get a good lighting and shining effect for the sides(both inside and outside) of the duct?

Thanks

jebus
06-20-2003, 05:50 AM
polygon normals will give it a flat shaded look and vertex normals will make it more smooth looking. your normal calculation meethod seems strange. for polygon normals it's just a vector perpendicular to the poly. for vertex normals you must average the normals of a vertex's surrounding polys.

jebus